function floatingtitle()
local float = true
while float == true do
gui.back.title:TweenPosition(UDim2.new(0.114, 0,-0.151, 0))
wait(1.1)
gui.back.title:TweenPosition(UDim2.new(0.114, 0,-0.101, 0))
end
end
wait(0.1)
floatingtitle()
✓ ANSWER ACCEPTED
Why is this while loop only running once and then stopping?
1 answer
✓ Accepted answer
It looks like it's running fine. Print something inside the loop to see for yourself. I think what's happening is that your tween isn't stopping for the other tween. I had this issue a while ago and I think you need to change the override property of the tween position function.
This discussion is preserved as it was. New answers, comments, and votes are closed.

9 comments
when i try to do that it says unable to cast bool to token
make sure it's the fifth parameter in the function
https://developer.roblox.com/en-us/api-reference/function/GuiObject/TweenPosition
now the gui goes up but does not go back down after 1 second.
do each of them have the override property set to true?
yes
i fixed by adding another wait after the second tween function. thanks for helping
can you update your post to what the code looks like rn
alright good to know