I have this so far
Amount = script.parent.parent script.Parent.Parent.Parent.Parent.Parent.Character:WaitForChild('Humanoid').Died:connect(function() Amount:WaitForChild('PE').Text = Amount:WaitForChild('PE').Text + 1 end)
It works fine the first time someone leaves, but then once a second player leaves it adds more then one.
You need to make a variable that will be a constant counter for the players that have left. Also, you need to use the PlayerRemoving event of players to add one to the variable and update the text accordingly. What you were doing was using died, meaning whenever a player resets, it adds one to the text.
local Amount = script.Parent.Parent local PlayersLeaving = 0 game:GetService("Players").PlayerLeaving:Connect(function() PlayersLeaving = PlayersLeaving + 1 Amount:WaitForChild('PE').Text = PlayersLeaving end)