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

my function keeps exhausting itself, despite having a wait(), any help?

the function is supposed to loop the other functions and then add the bottom two to the loop when InRound == true. The function keeps exhausting itself.

function DoTheThings()
	while true do
		NotEnoughPlayers()
		CheckForPlayers()
		if InRound.Value == true
			then Intermission()
					sortTeams()
						wait (1)
		end
	end
end

thanks in advance for any help!

1 answer

✓ Accepted answer

Try to actually put the wait in the while loop, you wrote in in the if statement

function DoTheThings()
    while true do
        NotEnoughPlayers()
        CheckForPlayers()
        if InRound.Value == true then 
	        Intermission()
	        sortTeams()
        end
    	wait(1)
    end
end

2 comments

0

why didnt I think of that? thanks for the help

0

no problem!

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