Animation adjust speed not working! (Please help)

so im trying to animate something that isn’t a default roblox rig, and ive made the animation for it. it works, but it’s going too fast. I’ve seen elsewhere they you should use Animation:AdjustSpeed()
but that didn’t work for me. Here is my script:

local animator = script.Parent.AnimationController.Animator
local IdleAnim = script.Idle
local AttackAnim = script.Attack

local Idle = animator:LoadAnimation(IdleAnim)
local Attack = animator:LoadAnimation(AttackAnim)

Attack:AdjustSpeed(0.25)

Idle:Play()
while wait(10) do
	Attack:Play()
	Attack.Ended:Connect(function(play)
		Idle:Play()
	end)
end

Confused on why you need to Adjust the speed if you’re not wanting to adjust the speed in the first place, you’re also not stopping the Idle Animation and making it place twice (each time the loop runs x2)

I suggest doing this,


local Speed_Interval = 0.5 -- Change this to what you see fit.
local Animator = script.Parent:WaitForChild("AnimationController"):FindFirstChild("Animator")
local IdleA, AttackA = script:WaitForChild("Idle"), script:WaitForChild("Attack")

local Idle,Attack = Animator:LoadAnimation(IdleA), Animator:LoadAnimation(AttackA)

Idle:Play()
task.spawn(function()
   while wait(10) do
      Idle:Stop()
      Attack:Play()
      Attack:AdjustSpeed(Speed_Interval)
      Attack.Ended:Connect(function(play)
		Idle:Play()
	end)
   end
end)

Ignore the format, it’s written via the Forum.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.