Tweenservice not looping/running

The following script doesn’t run the tweening animation, OR it runs it once. (I can’t see because the game takes too long to load) Is there an error in the code?

local tweenInfo = TweenInfo.new(
	2,
	Enum.EasingStyle.Circular, 
	Enum.EasingDirection.In,
	-1, 
	true, 
	0
)
local ending = {
	["Position"] = script.Parent.Parent.Tele1_2.Position,
}
script.Parent.Position = script.Parent.Parent.Tele1_1.Position
game:GetService("TweenService"):Create(script.Parent, tweenInfo, ending)

You have to call :Play() on the tween through a variable

2 Likes

Is “Create” creating a variable for me to “play” ?

2 Likes

local tween = tweenservice:Create()
tween:Play()

3 Likes

If you want it to loop I recommend putting the tween:Play() in a while loop. Just do while true do

3 Likes

Will the code continue to run or will it wait until the tween is finished? Will tween:Play():Wait() work to stop the script until the tween is finished?

2 Likes

it would run forever :smiley: I hope i helped

I meant if I changed the looping to 1 instead of -1, is there a way to know when the tween ends (or do I have to make a wait() manually