I am making a round system off of an example, the one things that are the example are the time things, everything else I built off of. One problem when 2 people join the server it still doesn't work any help?

local intermissiontime = 5
local gametime = 3
local players = game.ReplicatedStorage.players
local status = game.ReplicatedStorage.Status

game.Players.PlayerAdded:connect(function()
	players.Value = players.Value + 1
end)

game.Players.PlayerRemoving:connect(function()
	players.Value = players.Value - 1
end)

if players.Value < 2 then
	status.Value = "Not enough players. 2 are needed"
elseif players.Value >= 2 then
	while wait do
		for i=intermissiontime,1,-1 do
			wait(1)
			status.Value = "Intermission:" ..i.. "seconds"
		for i=gametime,1,-1 do
			wait(1)
			status.Value = "Game:" ..i.. "seconds"
		end
		end
	end
end

6 comments

0

Why are the players in replicated storage?

0

You can't reparent a Player.

2

I think that "players" is an intvalue.

0

Yeah, its most defiantly an intvalue.

0

There is probably something wrong with the code that assigns the value of the intvalue

0

no i think theres something wrong from line 14 to line 27