local char = script.Parent
local hum = char:WaitForChild("Humanoid")
local animations = char:WaitForChild("Animations")
local animation = char.Animations.FallAnimation
local animplayer = hum:LoadAnimation(animation)
animplayer:AdjustSpeed(0.2) -- speed of animation
local falling = false
local startpos = nil
while true do
wait()
if hum.FloorMaterial == Enum.Material.Air and falling == false then
falling = true
local fallpos = nil
startpos = char.HumanoidRootPart.Position
repeat
wait()
if char.HumanoidRootPart then
fallpos = char.HumanoidRootPart.Position
end
until
hum.FloorMaterial ~= Enum.Material.Air
falling = false
if fallpos ~= nil and startpos ~= nil then
print((Vector3.new(0,fallpos.Y,0) - Vector3.new(0,startpos.Y,0)).Magnitude .. "studs fell")
if (Vector3.new(0,fallpos.Y,0) - Vector3.new(0,startpos.Y,0)).Magnitude >= 50 and hum then
animplayer:Play()
hum.WalkSpeed = 0
hum.JumpPower = 0
wait(1)
hum.WalkSpeed = 16 --normal walkspeed
hum.JumpPower = 50 --normal jumppower
end
end
end
end
when u make animations this isnt enough:
u must copy the first keys and paste somwhere forward so its longer:
i think im done here good luck
ight i figured out the problem by myself now. I just looped the animation and then put
animplayer:Stop() at the end and then it worket
but still ty for your massive help
Set your animations priority as ‘action’ so it is not being overwritten by the default animations that are being played by the character.
This should allow you to not have to loop the animation.
Glad you have a solution though.
oh, ok ty i will try it didnt know that this works