Hello, fellow programmers, I’m having an issue with the number of players in the server from a script!
Script location: ServerScriptService
Errors: nil
--// Services
local PlayerService = game:GetService("Players")
--// Varaibles
local Cooldown = 60
local PlayerCount = 0
while wait(Cooldown) do
local Players = PlayerService:GetChildren()
for i = 1, #Players do
print("Player Found")
PlayerCount += 1
end
end