Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why is this while loop only running once and then stopping?

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()

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.

9 comments

0

when i try to do that it says unable to cast bool to token

0

make sure it's the fifth parameter in the function

0

now the gui goes up but does not go back down after 1 second.

0

do each of them have the override property set to true?

0

yes

0

i fixed by adding another wait after the second tween function. thanks for helping

0

can you update your post to what the code looks like rn

0

alright good to know

This discussion is preserved as it was. New answers, comments, and votes are closed.