How to make "Tween.Completed" a bool value

Hello developers.
The title pretty much summarises what im in need for. There may be an extremely easy fix however for some reason i cant think of it. Basically, im trying to make a closing door system, and i want a light to spin and finish when the door has finished tweening and also looped a certain amount of times. Below is the example of what im trying to accomplish.

image

1 Like

do this instead:

until timesrepeated >= 60 and ongoingTween.Completed

You can try this

local tweenCompleted = false

ongoingtween.Completed:Once(function()
    tweenCompleted = true
end)

-- rest of your code here
until timesrepeated >= 60 and tweenCompleted

I have attempted this however it just results with an error as im pretty sure it doesnt recognise that as a value

Could you perhaps show your full code, and what ongoingtween actually is?

Thank you for the support and the time you took to make your response. Greatly appreciated!

2 Likes

Could also try this:

until timesrepeated >= 60 and ongoingTween.PlaybackState == Enum.PlaybackState.Completed