Whats wrong with my script? (sprint)

You forgot to capitalize the I but your problem is that the walkspeed doesn’t even change am I correct?

i got the script working :smiley: thank you for the help i appreciate it

ill just mark that solution lol

You don’t have to. Can you tell me how it was working though?

local char = game.Players.LocalPlayer.Character
local hum = char:WaitForChild("Humanoid")
local anim1 = hum:LoadAnimation(script:WaitForChild("BlockAnim"))
local RunningVal = char:WaitForChild("IsRunning")

anim1:Play()
game:GetService("UserInputService").InputBegan:connect(function(input) 
	if input.KeyCode == Enum.KeyCode.LeftShift and RunningVal.Value == true then 
		hum.WalkSpeed = 34
	end
end)

game:GetService("UserInputService").InputEnded:connect(function(input) 
	if input.KeyCode == Enum.KeyCode.LeftShift then
	RunningVal.Value = false
		hum.WalkSpeed = 8
		wait(5)
		hum.WalkSpeed = 16
	end
end)

Ahh yes, you forgot to add :WaitForChild(). We all make those mistakes.

1 Like

lol all this confusion over a little mistake