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

Help with a Script Please?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

This Script put a local script into the players character when the character is added but I need the local script to work when the player resets also.

Script

 player.CharacterAdded:connect(function(Character)

    script.LocalScript:clone().Parent = Character
end)

2 answers

Log in to vote
0
Answered by 9 years ago

The issue is the way your trying to get it, player is nil in this script, also, we need to change the way you get the players character. To fix that we can do this:

game:GetService("Players").PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function()
script.LocalScript:clone().Parent = p.Character
end)
end) 
Ad
Log in to vote
0
Answered by 9 years ago

Go to youtube.com/PeasFactory . Learn for free he is good

Answer this question