Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Help with a Script Please?

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

✓ Accepted answer

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) 

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

This discussion is preserved as it was. New answers, comments, and votes are closed.