Why does this not change walkspeed

forgive me
for i am stupid

game.Players.LocalPlayer.CharacterAdded:Connect(function()
	game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 14
end)

(in starterplayerscripts)

The character is probably spawned before the script executes, meaning that the event wouldn’t fire (I tried it a few times and it only worked once). If you wanted to make sure the walkspeed was always changed, you could add a check in the script to see if the character was already spawned in, like this:

if game.Players.LocalPlayer.Character then
	game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed = 14
end
game.Players.LocalPlayer.CharacterAdded:Connect(function()
	game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed = 14
end)

I would recommend using :WaitForChild when referencing children of the character on the client, as there might be delays in replication.

i noticed that in the “world” section of the game settings i can set walkspeed

is that a bad idea? are there downsides to it? or should i do that?

If it is going to be the default walkspeed, it is perfectly fine to use it.

Just go to Players properties and then change walkspeed ;-;

2 Likes
local players = game:GetService("Players")

players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local human = character:WaitForChild("Humanoid")
		human.WalkSpeed = 14
	end)
end)
1 Like