roblox studio tweenservice code example
Example 1: roblox tweenservice
local TweenService = game:GetService("TweenService")
local part = script.Parent
local goal = {}
goal.Position = Vector3.new(1, 0, 1)
goal.Color = Color3.new(0, 1, 0)
local tweenInfo = TweenInfo.new(5)
local tween = TweenService:Create(part, tweenInfo, goal)
wait(5)
tween:Play()
Example 2: 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 3: 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()