Players are complaining of playing the same maps too many times in a row. I would be so grateful if anyone could help me with this. This is what I have...


~~~~~~~~~~~~~~~~~while true do
	--load a random map
	statustag.Value = "Loading Map"
	timertag.Value = -1
	mapholder:ClearAllChildren()
	wait(2)
	local allmaps = maps:GetChildren()
	local newmap = allmaps[math.random(1, #allmaps)]:clone()
	newmap.Parent = mapholder
	wait(2)

	--wait for contestants
	while true do
		wait(2)
		contestants = {}
		for _, player in pairs(game.Players:GetPlayers()) do
			if player and player.Character then
				local humanoid = player.Character:WaitForChild("Humanoid")
				if humanoid and humanoid.Health > 0 then
					table.insert(contestants, player)
				end
			end
		end
		if #contestants >= 2 then
			break
		else
			statustag.Value = "Waiting for Players"
			timertag.Value = -1
		end
	end~~~~~~~~~~~~~~~~~

3 comments

0

make whatever map has already been played as a value and save that value

0

then detect if the map loaded is that value

0

if it is, reset the script