Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How Do I Fix This WalkSpeed Problem?[Closed]

I was messing with the walkspeed and when I did this script, which I looked in the Roblox Wiki. (Part of it)

game.Players.tanzane.Character.Humanoid.WalkSpeed = 60

When I tested it out in studio it worked, but when I enter my game through the roblox website and clicked play. My walkspeed is normal. Is there a different script I should do?

(This is all in a Local Script)

1 comment

0

You may have to add some type of wait, or you may have to to try it in a regular script.

2 answers

✓ Accepted answer

What I did is completely rewrite the script so it changes EVERYONE's WalkSpeed if you would like it to be just yours you would have to play around with it. Also with your current one you never added a loop or anything like that so it would be used once and never be used again, or possibly even never be used. Also here is some information on Local Scripts you could learn from that source when and when not to use a Local Script

Put this in a NORMAL Script!

playerspeed = 60
gw = game.Workspace

while true do
wait(5)
local list = game.Players:getChildren()
for i = 1, #list do
	local player = gw:findFirstChild(list[i].Name)
	if player ~= nil then
		hum = player:findFirstChild("Humanoid")
		if hum ~= nil then
			hum.WalkSpeed = playerspeed
		end
	end
end
end

If this answered your Question, Please remember to Submit as Answer!

4 comments

0

It worked, thanks. ^-^

0

Do you mind clicking Answer on my post since it worked? Thanks :) It gives me reputation and helps me in the future

1

Whoever Downvoted me is another Random Downvoter.... I am not begging for rep. When someone answers your question your supposed to click Accept as Answer

0

Never use while true do.. Thats why.

The script is trying to change your characters WalkSpeed before your character loads.

The simplest thing you could do is use the CharacterAdded event

game.Players.PlayerAdded:connect(function(player) --this runs every time a player joins the game
	if player.Name == "tanzane" then --this checks if the player's name is tanzane
		player.CharacterAdded:connect(function(char) --this runs every time your character respawns
			local humanoid = char:WaitForChild("Humanoid") -- this waits for the character's humanoid to load
			humanoid.WalkSpeed = 60 -- this changes the humanoid's walkspeed
		end)
	end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.