I've been trying to find the number of models inside of a folder named Ingame. These models will be players who are currently playing a level, and once the number of players in the Ingame folder reaches 1, a GUI will appear naming them as the winner. Here is my code so far...
local ingame = workspace.Ingame:GetChildren()
if vals.Winner.Value ~= "" then
s.Value = vals.Winner.Value.. " has won!"
vals.Winner.Value = ""
elseif ingame < 2 then
vals.Winner.Value = ingame:GetFirstChild()
s.Value = vals.Winner.Value.. " has won!"
vals.Winner.Value = ""
else
s.Value = "No one has won!"
I have tried creating another variable that turns ingame into a number, by doing
local ingamenum = ingame.tonumber()
but this didn't seem to work, and I can't quite get my head around how I would do this otherwise.
Any help is appreciated!

3 comments
use key value pairs
#Folder:GetChildren() works for getting the number of children a folder has
@theking48989987 see my answer