Script not changing player walkspeed

I’m trying to change the playerwalkspeed for devices with touch enabled.
This is a localscript inside StarterCharacterScripts

Nothing is happening in-game, with no errors

I couldn’t find a similar script compared to mine and I’m not sure if its a problem with the script or it being in the wrong place, or it being both.

if game:GetService("UserInputService").TouchEnabled == true then
	game.StarterPlayer.CharacterWalkSpeed = 100
end

This is what works for me.
game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed = 100
or
game:GetService("Players").LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed = 100

1 Like

Change speed using the players humanoid