Like this?
local plrs = game.Players
local ready = false
while true do
coroutine.resume(coroutine.create(
while true do
local num = #plrs:GetPlayers()
if num > 1 then
local ready = true
else
local ready = false
end
end)
Like this?
local plrs = game.Players
local ready = false
while true do
coroutine.resume(coroutine.create(
while true do
local num = #plrs:GetPlayers()
if num > 1 then
local ready = true
else
local ready = false
end
end)
Yes! That’s will should work, if it will not work, try put another ) at end)
It still doesn’t work. I don’t know what is going on
It’s underlining the word
while
in blue
Do you get any errors? That’s maybe about I writed that wrong.
Oh problem is you writed code like wrong position, use coroutine and write it again without copying.
Ok, I’ll see if that will work
Here is code I writed in a program
coroutine.resume(coroutine.create(function( while true do; local num = #plrs:GetPlayers() if num > 2 then; ready = true else; ready = false end end))
You not need play with it just copy paste and run code
I’ve layed it out like this - still not working…
while true do
coroutine.resume(coroutine.create)
while true do
local num = #plrs:GetPlayers()
if num > 1 then
local ready = true
else
local ready = false
end
end
end
Look the new post, it’s because I forget add function thing just copy paste and do not play with code just run the game
I entered this and didn’t play with it…
coroutine.resume(coroutine.create(function( while true do; local num = #plrs:GetPlayers() if num < 2 then; ready = true else; ready = false end))
Edited script again, try it. I’m really sorry I’m at mobile so I has some mistakes.
I just ran it, didn’t work again…
Last try it now will work I edited if it will not work I cant help you anymore
Just do this:
while true do
local num = #plrs:GetChildren()
if num > 1 then
-- round starting
else
-- wait for more players
end
end
Are you using a regular script in a screengui?
Yes, this is a regular script
You can try this too
This worked! Thank you!
You all helped a lot though