I want check if a tween is complete finish but how can I do that?
this is what I have been created untill now:
Edited: Again I just dont want let the player spam the tween so many times as he wants. Only when the tween is finish he can play it again
local tween = TweenService:Create(GreenCircle, TweenInfo.new(1), {ImageTransparency = GreenCircle.ImageTransparency + 1})
if tween.IsComplete then
tween:Play()
end
function TweenCreate(Obj,Info,Props)
local T = game:GetService("TweenService"):Create(Obj,Info,Props)
T:Play()
return T
end
local Tween = TweenCreate(GreenCircle, TweenInfo.new(1), {ImageTransparency = GreenCircle.ImageTransparency + 1})
Tween.Completed:Wait()
TweenInfo.new(
1, -- Interval
Enum.EasingStyle.Sine, -- The effect of Tweening Animation
Enum.EasingDirection.Out, -- The Direction (I can't actually explain the meaing of this but I use Out most of the time)
0, -- How many times does the tween will play. -1 will loop the infinitely
false, -- Does the tween will play in reverse?
0 -- Delay
)