Hi I need help with this running script Right now it plays when you press shift even if you're standing still how would you make it so it only plays it when you are moving around and stuff?
repeat
wait()
until game.Players.LocalPlayer
player = game.Players.LocalPlayer
character = player.Character
game.Workspace:WaitForChild(game.Players.LocalPlayer.Name)
if not character then
character = player.CharacterAdded:wait()
end
Mouse = player:GetMouse()
humanoid = character:WaitForChild("Humanoid")
s = humanoid:LoadAnimation(script.Animation)
Mouse.KeyDown:connect(function(key)
for i, v in pairs(game.Players:GetChildren()) do
if Enum.KeyCode.LeftShift then
s:Play()
humanoid.WalkSpeed = 30
end
Mouse.KeyUp:connect(function(key)
if Enum.KeyCode.LeftShift then
s:Stop()
humanoid.WalkSpeed = 16
end
end)
end
end)

2 comments
could u show me how i would go about doin that?
Sure. But can you wait until tommorow? If so, thank you for your patience