I want to place a LocalScript into player when that player joins, so the LocalScript would always work in him. I used these lines.
1 | local Players = game:GetService( 'Players' ) |
2 | local WeldHandler = .Parent.WeldHandler |
3 |
4 | Players.PlayerAdded:connect( function (player) |
5 | local clonedscript = WeldHandler:Clone() |
6 | clonedscript.Parent = player |
7 | end ) |
And that isn't appearing when I test the game :/
The first error I found was on line 2, you put local WeldHandler = .Parent.WeldHandler
, I think you meant to put local WeldHandler = script.Parent.WeldHandler
.
Second thing that I would change is on line 6, you put the cloned script into the player
, if I were you I would place it in the player.PlayerScripts
, which was made to hold local scripts in the player.