I have a few simple questions about functions within a function.
For example, this is my current code
function GameInProgress()
print("The game is in progress")
local playersingame = game.Players:GetChildren()
task.spawn(function()
end)
while true do
if #playersingame >= 2 then
print("Round is still in progress")
elseif #playersingame == 1 then
print("We have a winner")
end
wait(1)
end
end
Say I want to check to see if a player died so I can take them out of the playersingame table.
If I use
player.Character.Humanoid.Died:Connect(function()
Inisde the function, how will it be called? Would I have to do a while true do loop, or will it be called while inside of a function.
Please feel free to ask for clarification