#Trying to make a ready button but i cant figure it out

6 messages · Page 1 of 1 (latest)

meager hedge
#

hey yall im trying to figure out how to make a "waiting for all players ready button" or sum like that but im to dumb to figure out how to do it i tryied making it with bool values but i couldnt get it to work

crude trellis
#

idk

compact spade
# meager hedge hey yall im trying to figure out how to make a "waiting for all players ready bu...

You could just do it with a loop, checking if any value inside an array is false, yet this is not all that efficient so what I would do:

local AmountOfNotReady = --amount of players you've to wait for

RemoteEvent.OnServerEvent...function(Player:Player, IsReady:Boolean)
  --Add some stuff to visualize player being ready or not ready
  AmountOfNotReady += IsReady and -1 or 1
  
  if AmountOfNotReady ~= 0 then return end
  --add code here that has to trigger when all people are ready  
end)
meager hedge
#

ty dawg

plush kindle
#

inb4 where do i put that

compact spade