Answers for "tweenservice:create()"

1

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

tweenservice

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

Code answers related to "tweenservice:create()"

Browse Popular Code Answers by Language