I'm attempting to move a Local Script from ServerScriptService to a player once they join but keep running into road blocks. Someone tried to help me out by giving me this script :
game.Players.PlayerAdded : connect (function(player)
ls = game.ServerScriptService.LocalScript : clone ()
ls.Parent = Player.Character
end)
When I found that the above script didn't work, I attempted to fix it on my own:
game.Players.PlayerAdded : connect (function(player)
player = game.ServerScriptStorage.LocalScript : clone ()
player.Parent = game.Players.LocalPlayer.Character
end)

5 comments
Please format your code in Lua Code block.
The first script will work perfectly fine as long as you have the names and everything correct. Just make sure that that isn't your problem, and try to run it again. Also, in just in case, make sure that the problem isn't simply that the LocalScript doesn't do anything to alert you to it's presence. Check to make sure that it was moved in the Explorer.
When ever I try and use the first code, I keep getting a blue line under "ls" stating that its only used in the enclosing function, consider changing it to local (which I have attempted :c)
Whenever the lua debugger says that then it's just suggesting you turn x = "code" into local x = "code" so it's not the script breaking
Lol when it says consider changing it to local, it means a local variable. Not a local script.