Lua Learning
Tweening
Tweening is such an important part to developing and polishing any game on roblox by making things smoother
Here are some examples:
-- Tweens --
local TS = game:GetService("TweenService")
local TInfo = TweenInfo.new(
-- Time --
1,
Enum.EasingStyle.Sine, -- Change to whatever u want --
Enum.EasingDirection.In, -- This Applies in a forward direction and could be reversed with "out" however InOut is for the smoothest motion --
0, -- How much you want it to be repeated
false -- Reverse after completed "true" makes it true and "false" basically says no
)
local Tween = TS:Create(-- Part To Be tweened could be ui aswell
game.Workspace.Part,
TInfo, -- Using the info we just made
{Position = UDim2.new(0,0,0,0)} -- a table for the instance to be changed e.g. Position, Size or more and what u want to change that instance to be presented
-- with either UDim2.new or Vector3.new
)
Tween:Play() -- Playing Tween
-- Tweens can be paused with Tween:Pause() and to unpause just do Tween:Play() and it will resume at the paused instance
More soon..
more coming soon. Eventually (after maybe a month) most things will have appeared and Will show to make your lua scripting life easier





