-- [[ Services ]] -- local Players = game:GetService("Players") local Workspace = game:GetService("Workspace") -- [[ Variables ]] -- local PlayerCountTracker = Workspace:WaitForChild("PlayerNumber") local PlayerAmount = PlayerCountTracker.Value -- [[ Functions ]] -- local function increment() PlayerAmount = PlayerAmount + 1 end local function decrement() PlayerAmount = PlayerAmount - 1 end -- [[ Events ]] -- Players.PlayerAdded:Connect(increment) Players.PlayerRemoving:Connect(decrement)
The script does not error, but when I join the game in Studio, the PlayerCount doesn't work. Any help will be appreciated!
Nevermind, I had to play the game in the normal roblox application, not studio.