I’ve made a jumping animation that looks like this:
External MediaBut in game, it looks like this:
External Media** The animation is at priority action 4. **
– OnJump Function
Humanoid.Jumping:Connect(function(active)
if active then
if not jumpDebounce then
jumpDebounce = true
Animate(Humanoid.Animator, data.Animations.Jump, "Jump", true, 1)
end
else
jumpDebounce = false
end
end)
– Animate Function
function Animate(Animator, AnimationId, Name, StopAnimations, Speed)
if Name ~= currentlyPlaying and StopAnimations then
if CurrentAnimations[currentlyPlaying] then
CurrentAnimations[currentlyPlaying]:Stop()
end
elseif Name == currentlyPlaying then
return
end
local NewAnimationObject = Instance.new("Animation")
NewAnimationObject.AnimationId = AnimationId
local NewAnimation = Animator:LoadAnimation(NewAnimationObject)
NewAnimation:Play()
NewAnimation:AdjustSpeed(Speed)
NewAnimationObject:Destroy()
CurrentAnimations[Name] = NewAnimation
currentlyPlaying = Name
end
These are on a local script.