I’ve tryed messed around with my local script and I can’t seem whats wrong with it.
What I want the script to do
- Tween a UI part
Error I’m getting
- Not Tweening the UI after the first loop
What I’ve tryed
-
Putting the
while true do
in between line 5 and 6 -
Changing the
tween2:Pause()
and replacing it withtween2:Cancel()
My code
- My code is in a local script and the local script is a child of a UI
--locals--
local LoadingBox = script.Parent
local LoadingScreen = script.Parent.Parent
--
local TweenService = game:GetService("TweenService")
local tweenInfo2 = TweenInfo.new(3, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut)
local tween2 = TweenService:Create(LoadingBox, tweenInfo2, {Rotation=360})
while true do
wait(1)
print("In loop")
tween2:Play()
tween2.Completed:Wait()
tween2:Pause() -- I have tryed tween2:Cancel()
tween2:Play()
end