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

script telling the localplayer will not speed up how to solve it?

Asked by 6 years ago

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.

2 answers

Log in to vote
0
Answered by 6 years ago

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

Ad
Log in to vote
0
Answered by 6 years ago

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

Answer this question