i keep trying repeat wait() until game.Players.LocalPlayer.Character ~= nil
but it keeps saying localplayer is nil. I need help badly.
You need to use a LocalScript
. Regular scripts run on the server, and therefore don't have any LocalPlayer
. Depending on what the script is used for, there are multiple suggestions on where to place your LocalScript
.
-- local script in Replicated First (as an example) local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() -- ^^ this will wait for the character to load.