Script:
local Humanoid = Player.Character.Humanoid
local AnimHold = Instance.new("Animation")
AnimHold.AnimationId = "http://www.roblox.com/Asset?ID=".. "7171945000"
local AnimRun = Instance.new("Animation")
AnimRun.AnimationId = "http://www.roblox.com/Asset?ID=".. "7171695596"
local AnimCrouch = Instance.new("Animation")
AnimCrouch.AnimationId = "http://www.roblox.com/Asset?ID=".. "7172079149"
local AnimHoldTrack = Humanoid:LoadAnimation(AnimHold)
local AnimRunTrack = Humanoid:LoadAnimation(AnimRun)
local AnimCrouchTrack = Humanoid:LoadAnimation(AnimCrouch)
print(Type)
if Type == "Walking" then
AnimCrouchTrack:Stop()
AnimRunTrack:Stop()
wait()
AnimHoldTrack:Play()
elseif Type == "Run" then
AnimCrouchTrack:Stop()
AnimHoldTrack:Stop()
wait()
AnimRunTrack:Play()
end
Problem: Run and walking work when I press it for the first time, but it does not work when I press it for the second time.