Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How Do I Slow Down The Speed Of My Animation?

Asked by 5 years ago

I have a really nice animation but when i import it into the game and all that, it gets cut short so the animation basically only plays half of the animation even tho its only like 2 or 3 seconds so i figured 1 second animations work. now how do i slow that 1 second animation down so its not so fast??? Player = game.Players.LocalPlayer Humanoid = Player.Character:WaitForChild("Humanoid") Health = game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Health char = Player.Character Animation = script.Anim animtrack = char.Humanoid:LoadAnimation(Animation) animtrack.Priority = Enum.AnimationPriority.Action repeat wait() until Player.Character name = Player.Name Humanoid.HealthChanged:Connect(function(Health) if Health < 50 then animtrack:Play() char:WaitForChild("Humanoid").WalkSpeed = 5 end end) Humanoid.HealthChanged:Connect(function(Health) if Health > 50 then animtrack:Stop() char:WaitForChild("Humanoid").WalkSpeed = 16 end end) This is what i have so far, how can i implement it into my script? Thanks For All Help!

1 answer

Log in to vote
0
Answered by 5 years ago

Hello you can adjust the speed of an animation using: https://developer.roblox.com/api-reference/function/AnimationTrack/AdjustSpeed

Alternatively and probably easier to do you could use the animation plugin: 1) https://www.roblox.com/library/543295026/Animation-Editor 2) https://www.roblox.com/library/1882309978/Legacy-Animation-Editor (would recommend the legacy version unless in R15)

Hope this helps.

Ad

Answer this question