How to make a smoother transition between two animations

Hey, I found a method for creating the smooth “sine” transition by having a tween tween the weight as the animation plays. I hope this helps^^

local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://17862783974"

local humanoid = script.Parent:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
local animationTrack = animator:LoadAnimation(animation)

local TweenService = game:GetService("TweenService")
local NumberValue = Instance.new("NumberValue")
local Tween = TweenService:Create(NumberValue, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut), {Value = 1})

NumberValue:GetPropertyChangedSignal("Value"):Connect(function()
	animationTrack:AdjustWeight(NumberValue.Value)
	print(NumberValue.Value)
end)

task.wait(2)
Tween:Play()
animationTrack:Play()
5 Likes