hum.StateChanged:Connect(function(old, newstate)
if newstate == Enum.HumanoidStateType.Jumping then
print("jumped")
jumpstart:Play(0,1,.5)
running:Stop()
justjumped = true
elseif newstate == Enum.HumanoidStateType.Freefall then
jump:Play(0,1,.25)
elseif newstate == Enum.HumanoidStateType.Landed and old == Enum.HumanoidStateType.Freefall then
print("Landed")
jumpend:Play(0,1,.5)
jump:Stop()
if equipped then
idle:Play(0,1,0.25)
else
idlenoweapon:Play(0,1,0.25)
end
wait()
justjumped = false
end
end)
everything works perfectly except jump which doesn’t stop even though Landed prints so i know that code is running, any help is appreciated.
the problem was with jumpend animation which is supposed to play when the player lands, it was playing but it just doesn’t stop despite not being looped. it was Bugged, i created a new animation and replaced it now it works well