How to make a circle:Clone() become big and shrink using Vector3 and TweenService?
tweenservice:Create(circle,TweenInfo.new(1),{Size = big size vector}):Play()
tweenservice:Create(circle,TweenInfo.new(1),{Size = small size vector}):Play()
Use the reverse parameter of TweenInfo
:
local TweenService = game:GetService("TweenService")
local clone = circle:Clone()
clone.Parent = workspace
local reverses = true
local repeats = 0 --replace with math.huge to make it loop
local info = TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, repeats, reverses)
local old = clone.Size
local Tween = TweenService:Create(clone, info, {Size = Vector3.new(old.X*2, old.Y*2, old.Z*2)})
Tween:Play()
3 Likes
According to TweenService:Create devhub page, the recommended way to make a tween play indefinitely is to set RepeatCount
to -1.