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 make an OnEnter walkspeed script?

I need an OnEnter walkspeed script since when you join my game your speed for some reason is 32 instead of 16...

1 comment

2

You probably have another script changing the walkspeed. Just look through your game's scripts and fix the one causing it.

1 answer

✓ Accepted answer

Here's how you would normally do it..

game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(character)
		local hum = character:WaitForChild("Humanoid")
		hum.WalkSpeed = 16
	end)
end)

But in your case, since something else is changing the walkspeed, you might want to wait before changing it, like this.

game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(character)
		wait(.1)
		local hum = character:WaitForChild("Humanoid")
		hum.WalkSpeed = 16
	end)
end)

Again, you should probably fix the thing causing it. I just posted this in case other people want to see it.

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