Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make make maps random?

function minigameModule:chooseMap()
	local chosenMap = mapsStorage[#mapsStorage]:Clone()
	if findFirstChild(chosenMap, "Spawns") then
		chosenMap.Parent = workspace
		chosenMap:MakeJoints()
		self.currentMap = chosenMap
		return chosenMap
	end
end

1 comment

0

I would put your functions into an array and then use math.random to pick a random item from the table.

1 answer

You need to use ChosenMap = math.random(1,#mapsStorage) So bassicly if that did not work just use math.random.

This discussion is preserved as it was. New answers, comments, and votes are closed.