okay so i am making a mini-game place that uses module scripts for the mini-games this is the main script
spawn(function()require(Randomlyselectedmodulescript)(Playing)end)
wait(1)
start = tick()
while wait() do
if tick() - start >= 180 then
break
end
end
--break/end the module script
this is a test module script
return function(Players)
while true
--do minigame stuff
end
end)
how would i get the break/end the module script after 3 minutes without putting the wait 3 mins in the module script any help appreciated

4 comments
facts: 3 minutes = 180 seconds, so you would do wait(180)
without putting the wait 3 mins in the module script, also it will detect if the players die etc. so i need to have it loop instead if that is what you meant
oh, then u simply can't
Don't use while wait() do. You're clearly missing the point of the conditional portion of the loop. Adding an if statement to check the terminating condition in order to break is unacceptable.