|
| 22 Apr 2014 07:59 PM |
What is the best way to clone an object when a player joins and put it in their torso?
Tooltip is a StringValue as a child inside this script. The error is: Line4 Attempt to index a nil value.
local object = script.Tooltip
game.Players.PlayerAdded:connect(function(player) object:Clone().Parent = game.Workspace:FindFirstChild(player.Name).Torso end)
|
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Apr 2014 08:09 PM |
path = --yourpath
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) clone = path:Clone() clone.Parent = char end) end)
This should be an easy way. |
|
|
| Report Abuse |
|
|
|
| 22 Apr 2014 08:10 PM |
| What would I change to get their torso? |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Apr 2014 08:18 PM |
path = yourpath game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) local torso = char:FindFirstChild("Torso") clone = path:Clone() clone.Parent = torso end) end)
You were almost right,
|
|
|
| Report Abuse |
|
|