repeat wait () until game.Players.LocalPlayer ~= nil
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 1
heres my script and when i test it out in local servers it wont work. it's in a normal script in the workspace.
nvm i figured it out so stupid i was meant to place it in a local script in starter gui cause it will get cloned into the player omg i feel so stupid so stup[id so stupid OGMGGG
You can't get the Local Player from inside of a server script, use a Local Script inside StarterPack instead. Then you can get the player doing
local player = game.Players.LocalPlayer -- No need for any waits because this script wont load until the player is loaded.
Now if you want to get the character, you should use a wait since the character takes time to load. I'm going to add onto the code above
local player = game.Players.LocalPlayer -- No need for any waits because this script wont load until the player is loaded. local char = player.CharacterAdded:wait() -- Waits for the player's character to load. char.Humanoid.WalkSpeed = 1 -- And there's your solution.
If this helped, you know what to do :D