Restart a while true do loop?

so i am making a squid game and so whenever everyone dies it wouldnt restart the loop and i tried break before but that stops and makes it that it will never continue, so i am getting a ton of dislikes rapidly
this is a big thing that breaks my entire game and makes it no fun
it will be a big help if you helped me on this no matter what

function functionname()
   while true do

functionname() -- Use this to start/repeat the loop

i need more of an expanation than just code, you just sent me the paragraph i am also a beginner scripter so i need on how i run the command when im running it inside of the command

You’re asking for an explanation on code which may or may not apply to you, as well as the fact that the function linked would just not work due to it never ending. However, here goes nothing on your squid game which you’re ultimately late to but w/e.

local gameRunning = true -- Whether the server is running or not, i.e always true
local playing = {} -- Table with all players still in the game, remove from playing if dead/ out
while gameRunning do
  local taskFinished = false
  while #playing > 0 or not taskFinished do -- While amount of players playing is more than 0, loop
      -- Here you'll check if the task has been finished or not

So, you create a function with the loop inside, and to start the loop or to restart is only call the function like I showed on the script

so i already made it now with continue so its basically solved now

But could you show the solution?