generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Would this work?

Previous Thread :: Next Thread 
DailyTime is not online. DailyTime
Joined: 09 Nov 2013
Total Posts: 285
25 Jan 2014 08:10 AM
I am pretty new with this event.

p = script.Parent.Parent.Player.Value

for _, v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
for i, q in pair(v.className:IsA("Tool")) do
q:Clone().Parent = game.Workspace[p]
end
end
Report Abuse
xXmodzXx123 is not online. xXmodzXx123
Joined: 10 Jun 2012
Total Posts: 1874
25 Jan 2014 08:21 AM
nope
Report Abuse
DailyTime is not online. DailyTime
Joined: 09 Nov 2013
Total Posts: 285
25 Jan 2014 08:21 AM
whats wrong with it?
Report Abuse
xXmodzXx123 is not online. xXmodzXx123
Joined: 10 Jun 2012
Total Posts: 1874
25 Jan 2014 09:29 AM
u cant clone.. then do aprent
Report Abuse
Icecreamtopblank is not online. Icecreamtopblank
Joined: 11 Sep 2011
Total Posts: 682
25 Jan 2014 09:31 AM
ClassName*
Report Abuse
DailyTime is not online. DailyTime
Joined: 09 Nov 2013
Total Posts: 285
25 Jan 2014 09:55 AM
Doesn't make a difference.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
25 Jan 2014 09:58 AM
for _, v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
if (v:IsA("Tool")) then
v:Clone().Parent = game.Workspace[p]
end
end
Report Abuse
DailyTime is not online. DailyTime
Joined: 09 Nov 2013
Total Posts: 285
25 Jan 2014 10:12 AM
@Waz

Does it find a Tool named Tool or does it find the classname?

Because it is not working.
Report Abuse
DailyTime is not online. DailyTime
Joined: 09 Nov 2013
Total Posts: 285
25 Jan 2014 10:19 AM
..
Report Abuse
DailyTime is not online. DailyTime
Joined: 09 Nov 2013
Total Posts: 285
25 Jan 2014 10:24 AM
Nobody helpful today?

@Waz thanks but it didn't work though
Report Abuse
DailyTime is not online. DailyTime
Joined: 09 Nov 2013
Total Posts: 285
25 Jan 2014 10:31 AM
you got to be kidding me...
Report Abuse
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
25 Jan 2014 10:44 AM
p = script.Parent.Parent.Player.Value --Why not just use a object value

for _, Object in pairs (Game.Players.LocalPlayer.Character:GetChildren()) do --Might wanna make sure it has children
if Object:IsA("Tool") then
q:Clone().Parent = game.Workspace[p]
end
end
Report Abuse
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
25 Jan 2014 10:45 AM
Make sure it has a character*
Also if that still doesn't work its a problem with your setup
Output?
Report Abuse
DailyTime is not online. DailyTime
Joined: 09 Nov 2013
Total Posts: 285
25 Jan 2014 11:04 AM
Output is(when i pasted it in command bar):

12:02:25.455 - p = script.Parent.Parent.Player.Value

for _, Object in pai:1: attempt to index global 'script' (a nil value)


But there is no output itself when i click it. It doesn't add the value though and here is the script where it adds the value:

p = script.Parent.Text
f = script.Parent.Parent

script.Parent.MouseButton1Down:connect(function(c)
f.Visible = false
f.Parent.Frame1.Visible = true
f.Parent.Frame1.Player.Value = p
end)




Here is the script of the playerlist:

sg = "List"
root = "TextButton"

game.Players.PlayerAdded:connect(function(p)
local f = game.Lighting:findFirstChild(sg) and game.Lighting[sg]:findFirstChild("Frame")
if f then
for i, v in pairs(f:children()) do
if v.Name:sub(1, #root):lower() == root:lower() then
if v.Text == "" then
v.Text = p.Name
for _, e in pairs(game.Players:GetPlayers()) do
e.PlayerGui[sg][f.Name][v.Name].Text = p.Name
end
break
end
end
end
end
end)

game.Players.PlayerRemoving:connect(function(p)
local f = game.Lighting:findFirstChild(sg) and game.Lighting[sg]:findFirstChild("Frame")
if f then
for i, v in pairs(f:children()) do
if v.Name:sub(1, #root):lower() == root:lower() then
if v.Text == p.Name then
v.Text = ""
for _, e in pairs(game.Players:GetPlayers()) do
e.PlayerGui[sg][f.Name][v.Name].Text = ""
end
break
end
end
end
end
end)
Report Abuse
DailyTime is not online. DailyTime
Joined: 09 Nov 2013
Total Posts: 285
25 Jan 2014 11:21 AM
...
Report Abuse
DailyTime is not online. DailyTime
Joined: 09 Nov 2013
Total Posts: 285
25 Jan 2014 11:29 AM
...
Report Abuse
DailyTime is not online. DailyTime
Joined: 09 Nov 2013
Total Posts: 285
25 Jan 2014 11:50 AM
...
Report Abuse
EpicNinja513 is not online. EpicNinja513
Joined: 31 Jan 2012
Total Posts: 941
25 Jan 2014 11:53 AM
q:Clone()
q.Parent = game.Workspace[p]

You don't just clone, then parent.
Report Abuse
DailyTime is not online. DailyTime
Joined: 09 Nov 2013
Total Posts: 285
25 Jan 2014 12:58 PM
Yes you can.
Report Abuse
iWasted1000Robux is not online. iWasted1000Robux
Joined: 26 Oct 2013
Total Posts: 813
25 Jan 2014 01:00 PM
m:clone().Parent = Workspace -- EXAMPLE

^^ that is perfectly acceptable. ^^

#nerdsunited
Report Abuse
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
25 Jan 2014 03:18 PM
"Command bar"
No duh it errored the command bar has no script.Parent
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image