Animation fade out issues

Im making a dash animation, but i want to add fade out to the end.
I’ve tried looking on the dev forum before but i haven’t found any working solutions.
other things i’ve tried:
Adjusting animation weight.
Using the first param from animation stop().
the animation is also looped.

https://streamable.com/j8lff8

   Default:WaitForChild("Dash").Event:Connect(function()
        
        local Character = Player.Character
        
        if _G.StatusHandler.ReturnChild({Character = Character,List = false, Name = "Stun"}) then return end
        
        local HumanoidRootPart = Character.HumanoidRootPart
        local Animator = Character.Humanoid.Animator
        
        local BodyVelocity = Instance.new("BodyVelocity")
        BodyVelocity.Parent = HumanoidRootPart
        
        BodyVelocity.MaxForce = Vector3.new(30000,25,30000)
        
        local Track = Animator:LoadAnimation(DefaultAnim:WaitForChild("Dash"))
        Track.Priority = Enum.AnimationPriority.Action2
        Track:Play(0.35)
        
        local AmountRan = 0
        local Connection
         Connection = RunService.RenderStepped:Connect(function(Dt)
            
            BodyVelocity.Velocity = HumanoidRootPart.CFrame.LookVector * 60
            AmountRan += Dt
            
            if _G.StatusHandler.ReturnChild({Character = Character,List = false, Name = "Stun"}) or Character.SF.Block.Value == true then AmountRan = math.huge end
            
            if AmountRan >= 0.3 then
                BodyVelocity:Destroy()
                Track:AdjustWeight(0,1)
                Connection:Disconnect()
            end
            
        end)
        
    end)

figured it out, apperantly if you play the same animation twice it doesn’t work.

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