So I made a Shift to run script, yet I am kind of stuck on something. How do I make an animation play when the player has begun running?
Heres the script:
`> local UserInputService = game:GetService("UserInputService")
local Character = script.Parent local Humanoid = Character:WaitForChild("Humanoid") local isRunning = false local runanim = game.ServerStorage.anims.Animation
UserInputService.InputBegan:Connect(function(key) if key.KeyCode == Enum.KeyCode.LeftShift then if not isRunning then isRunning = true Humanoid.WalkSpeed = 32 runanim:Play() else Humanoid.WalkSpeed = 16 runanim:Stop() isRunning = false end end end)`
Someone please help me with this, i think that it is the runanim:Play() / runanim:Stop() parts, yet i need something to confirm this for me or send me a fixed version of the script, Thanks for reading.
