tweening roblox code example
Example 1: Roblox Studio TweenService Example in lua 2020
local TweenService = game:GetService("TweenService")
local Part = script.Parent
local info = TweenInfo.new(
5,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
local Goals =
{
Size = Vector3.new(15,15,15);
}
local MakePartBigger = TweenService:Create(Part, info, Goals)
wait(5)
MakePartBigger:Play()
Example 2: TweenService Example
local TweenService = game:GetService("TweenService")
local Part = script.Parent
local info = TweenInfo.new(
5,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
local Goals =
{
Size = Vector3.new(15,15,15);
}
local MakePartBigger = TweenService:Create(Part, info, Goals)
wait(5)
MakePartBigger:Play() --Script By Rigby#9052 on Discord
Example 3: tweening roblox
local TweenService = game:GetService("TweenService")
local part = [Find a part in the workspace]
local tweenInfo = TweenInfo.new(
Time (Intger)
Easing style (Enum.EasingStyle)
Easing Direction (Enum.EaseingDirection)
Repeat Count (Intger *Make negative number to repeat forever*)
Reverses (Boolian)
Delay (Intger)
)
local tween = TweenService:Create(part, tweenInfo, {Position = Vector3.new(Position on the map)})
tween:Play()