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

How to get Game Default WalkSpeed?

Asked by 3 years ago

I know that Roblox' default walk speed is 16. Say I edited my game's default WalkSpeed value to 15 in Roblox Studio > Game Settings > World > Walk > Walk Speed.

In a script, I make the player's walk speed to 0 (stop). After x seconds, instead of setting up the player's WalkSpeed manually, I intend to set their WalkSpeed to the game's default WalkSpeed when they first entered.

0
Is there a reason why you can't just make a variable called defaultWalkSpeed and set it to 16? That way if you ever feel the need to do so you can customize the default walk speed. LeedleLeeRocket 1257 — 3y
0
humanoid.WalkSpeed = game.StarterCharacter.WalkSpeed ? Something like that should work although I'm not exactly sure what you are asking for in this question. ElongatedMongoose 138 — 3y
0
I could easily create one and set it manually. However, doing so would be confusing if I were to change the value via RobloxStudio>GameSettings because my manual variable would overwrite it. I just wanted to know if it is possible to just grab that default value from Game Settings, so whenever I need to change the game's default, I could easily do so from the Game settings to avoid confusion. ConsteIeo 63 — 3y

1 answer

Log in to vote
0
Answered by
Desmondo1 121
3 years ago

Put a local script in starter character scripts (Located in starter player) then just do "script.Parent.Humanoid.WalkSpeed = 20", 0 is the normal walkspeed

also if that doesn't work then you might wanna do "Script.Parent = game.Players.LocalPlayer" or something like that.

Ad

Answer this question