tweenservice
local tweenservice = game:GetService("TweenService")
local instance = some_instance
local tween_info = TweenInfo.new(
1, -- duration
Enum.EasingStyle.Linear, -- easing style
Enum.EasingDirection.InOut, -- direction
0, -- number of repeats
false, -- reverses when finished
0 -- delay
)
local goal = {
intstance_property_1 = "a",
intstance_property_2 = "b"
}
local tween = TweenService:Create(instance, tween_info, goal)
tween:Play()
-- tween:Pause()
-- tween:Cancel() - stops the tween and resets the values
local tween_ended
tween_ended = tween.Completed:Connect(function()
-- do something
tween_ended:Disconnect()
end)