Answers for "how to use tweenservice roblox"

4

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()
Posted by: Guest on March-15-2021
3

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()
Posted by: Guest on October-26-2020
0

tweenservice roblox

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)
Posted by: Guest on July-21-2021

Browse Popular Code Answers by Language