Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Cloning script not working, whats wrong? [UNANSWERED]

Asked by 10 years ago

hello, today I started playing around with meshes and some scripts, and what I tried to do is make a script that clones meshes to the characters when they join, for example lets say I got the Blue Collar cat left leg mesh, and what this script does is that it takes this mesh and clones it to the left leg of the character that joins, but it doesn't works. Heres the script:

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        script.Leftarm:clone().Parent = character."Left arm"
script.Leftleg:clone().Parent = character."Left Leg"
script.Rightarm:clone().Parent = character."Right Arm"
script.Rightleg:clone().Parent = character."Right Leg"
script.Torso:clone().Parent = character.Torso
script.Mesh:clone().Parent = character.Head
    end)
end)

The meshes are inside the script.

1 answer

Log in to vote
0
Answered by 10 years ago
game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        script.Leftarm:clone().Parent = character."Left arm"
script.Leftleg:clone().Parent = character["Left Leg"] --bracket
script.Rightarm:clone().Parent = character["Right Arm"] --bracket
script.Rightleg:clone().Parent = character["Right Leg"] --bracket
script.Torso:clone().Parent = character.Torso
script.Mesh:clone().Parent = character.Head
    end)
end)

Since the child of "character" has a space in it, it needs to be put in brackets.

0
ooooooooooooooooooooooooooooh!!! Thank you! biocommand 30 — 10y
0
Please leave +Reputation :) keitheroni 45 — 10y
Ad

Answer this question