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

How do you change the default WalkSpeed?

Asked by 6 years ago

I want the default walkspeed to be slower, Unless something changes it. Can I get some help?

0
How would I do that Notpace 2 — 6y

3 answers

Log in to vote
-1
Answered by
iddash 45
6 years ago

You could just change the players walkspeed when they enter the game. There is lots of ways to do this. Put this in a script , in StarterGui or StarterPack (makes sure its a LocalScript)

First we need to get the player:

local player = game.Players.LocalPlayer--get player

Next get the Character , which has the Humanoid in it:

local player = game.Players.LocalPlayer--get player
local character = player.CharacterAdded:Wait()--wait for charcater to load

Next get the Humanoid, which has WalkSpeed as a property.

local player = game.Players.LocalPlayer--get player
local character = player.CharacterAdded:Wait()--wait for charcater to load
local humanoid = character:WaitForChild("Humanoid")--wait for huamnoid to load

Then change walkspeed:

local player = game.Players.LocalPlayer--get player
local character = player.CharacterAdded:Wait()--wait for charcater to laod
local humanoid = character:WaitForChild("Humanoid")--wait for huamnoid to laod
humanoid.WalkSpeed =  1

Ad
Log in to vote
-1
Answered by
CootKitty 311 Moderation Voter
6 years ago

Out a Humanoid named StarterHumanoid inside of StarterCharacter, and change the properties of that Humanoid and it'll change the default Humanoid for everyone who joins, no script needed.

Log in to vote
-1
Answered by 6 years ago

Pretty simple, just place a LocalScript with your code inside ReplicatedFirst and every player that joins has their default WalkSpeed set.

local WalkSpeed = 100 -- You can set it to whatever you like(both name and speed)
game.Players.LocalPlayer:WaitForChild("Character").Humanoid.WalkSpeed = WalkSpeed -- Changing the player's walkspeed to what number we set it to earlier. Also the :WaitForChild() function is waiting for the player to load before we do anything to prevent bugs and glitches.

Answer this question