for _,v in pairs (game.Players:GetChildren()) do delay(#playerss, function() if v.Status.Value == "Vigilante" then if #v == 0 then workspace.Countdown.Value = 0 roundended = true end end end) end
I'm getting a problem with userdata values, is there any other way I can do this? I'm trying to find the amount of Vigilantes which are left, and if there is none, then the round ends and the countdown becomes 0.
Hi Zakkeh :)
I'm not sure where you're keeping the vigilantes but I strongly suggest that you have them stored in the workspace as variables. For example, in workspace have a variable called "Stats" and under that have "Vigilantes", "Killers", "Heros", "Detectives" etc...
When the game starts the players that are assigned those roles add one to each role. Then for certain events (death, leaving game) it takes one off. This may make your stat counting a lot easier.