Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

What can you use TweenService for in roblox studio?

Asked by 1 month ago

So i am making a game and i am wondering if you Can you use TweenService in GUI's so we can make animation with things like TextButton's and many more things in GUI.

0
Off topic: Not code related TTChaos 749 — 1mo

2 answers

Log in to vote
1
Answered by 1 month ago

TweenService can for sure be using in GUIs. It can be used in a variety of other things, too, like parts and PointLights. TweenPosition can also be used, as it's a part of TweenService. It is used to move things once without having to construct something like this:

local ts = game.TweenService
local part = script.Parent

local info = TweenInfo.new(parameters here)
local goals = {Position = Vector3.new(0,0,0)}
local tween = ts:create(part, info goals)
tween:Play()

Though this works too, TweenPosition is also used as well.

Ad
Log in to vote
0
Answered by 1 month ago
Edited 1 month ago

TweenService is a a service used for many important things like animating Guis or making Camera cutscenes. Here is an example made by roblox

local object = script.Parent
object.AnchorPoint = Vector2.new(0.5, 0.5)
object.Position = UDim2.new(0, 0, 0.5, 0)

wait(2)

object:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quint)

Answer this question