-
What do you want to achieve? So i know how to use tweens, but I want to really excel with them.
-
What is the issue? I simply don’t understand how to take advantage of this great feature.
-
What solutions have you tried so far? I used the dev hub to learn how to use them in the 1st place, but I want more information.
What more are you looking for? You are going to have to be more specific.
Tweens can smoothly transition almost any property of parts/guis.
local TweenService = game:GetService("TweenService")
local part = Instance.new("Part")
part.Position = Vector3.new(0, 10, 0)
part.Anchored = true
part.Parent = game.Workspace
local tweenInfo = TweenInfo.new(5)
local Info = {Position = Vector3.new(0, 10, 20)} --Can be any property that allows tweens. Transparency = 1, Color = Color3.new(), etc
local tween = TweenService:Create(part, tweenInfo, Info)
-- listen for their completion status
tween .Completed:Connect(function(playbackState)
print("tween1: "..tostring(playbackState))
end)
tween:Play()
Tween events are great.
tween.Completed:Connect() -- When tween finishes
tween:Pause()--Pause tween
tween:Cancel()--Cancel tween
wow, really helpful!
sorry for being vague, but this is exactly what I needed.
Tweens basically smoothly transition any Number type value. This transition can be configured to play in different styles. It can be paused and cancelled, and there are events for starting and ending. (Edit: Basically what had been said above)
Thanks for the info! I already knew that, though. I mean like advantage of using them.
