Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What can you use TweenService for in roblox studio?

Asked by 4 years 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 User#30567 0 — 4y

2 answers

Log in to vote
1
Answered by 4 years 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 4 years ago
Edited 4 years 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