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) -- Green
local tweenInfo = TweenInfo.new(5)
local tween = TweenService:Create(part, tweenInfo, goal)
wait(5) -- Wait Time
tween:Play()
3
1
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()
Thank you!
1
0
0
3
local tweenservice = game:GetService("TweenService")
local instance = some_instance
local tween_info = TweenInfo.new(
1, -- duration
Enum.EasingStyle.Linear, -- easing style
Enum.EasingDirection.InOut, -- direction
0, -- number of repeats
false, -- reverses when finished
0 -- delay
)
local goal = {
intstance_property_1 = "a",
intstance_property_2 = "b"
}
local tween = TweenService:Create(instance, tween_info, goal)
tween:Play()
-- tween:Pause()
-- tween:Cancel() - stops the tween and resets the values
local tween_ended
tween_ended = tween.Completed:Connect(function()
-- do something
tween_ended:Disconnect()
end)
Thank you!
3
0
Are there any code examples left?
New code examples in category Lua
-
Lua 2022-03-27 16:30:01 how to use for iv in pairs
-
Lua 2022-03-27 15:10:08 lua last item in table
-
Lua 2022-03-27 07:10:05 how to make a table in lua
-
Lua 2022-03-25 05:45:17 function parameters roblox
-
Lua 2022-03-24 19:50:37 lua variables
-
Lua 2022-03-16 23:30:02 lua list of all keys
-
Lua 2022-03-16 21:40:31 play sound love2d
-
Lua 2022-03-12 11:15:06 how to get the player mouse in roblox studio
-
Lua 2022-03-12 09:40:17 how to add a damage decimal in roblox studio
-
Lua 2022-03-02 18:40:19 lowercase lua