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

Question about changing from a Local Script into a Script?

Asked by 4 years ago

So I had to change my script from a local script into a normal script. Is there a certain word or variable I need to use to accesses the LocalPlayer in a normal script?

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

You can't access the local player through a server script, instead you can use PlayerAdded. More info on it here but I will show it here anyway:

game.Players.PlayerAdded:Connect(function(player)
    -- you can then do things like use characteradded to get the character, etc.
end)
Ad

Answer this question