|
| 20 Mar 2012 05:07 PM |
h = Instance.new("Hint") h.Text = "Select the tool, click at a pig to fire away, and get points!"
script.Parent.ChildAdded:connect(function(plr) user = game.Players[plr.Name] h.Parent = user.Character game.Lighting.Tool:Clone().Parent = user.Backpack end
script.Parent.ChildRemoved:connect(function(plr) user = game.Players[plr.Name] h.Parent = nil user.Backpack.Tool:Destroy() end
-[I've been to Nil]- |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2012 05:18 PM |
I must have been typing too fast...
It's supposed to clone a tool from lighting then give it to the player once he sits in the chair. A hint is also supposed to appear.
When the player gets up the tool is removed and the hint will be gone.
No output.
-[I've been to Nil]- |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2012 05:19 PM |
I'm not the best scripter, but I know a couple of your mistakes...
"script.Parent.ChildAdded:connect(function(plr)"
When you use a (function (), you need to end the "()".
script.Parent.ChildAdded:connect(function (plr) -- Script Here end)
Also, I'm PRETTY sure you have to say the parent of the cloned object like this:
e = game.Lighting.Tool:Clone() e.Parent = user.Backpack
I don't know much about tools, but thats what I got at glance. |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2012 05:30 PM |
No,
game.Lighting.Tool:Clone().Parent = user.Backpack
is still valid.
As for the functions, they can be both ways.
-[I've been to Nil]- |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2012 05:47 PM |
-Faic palm-
I didn't add ')' after the ends... |
|
|
| Report Abuse |
|
|