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

What is wrong with my random-map choosing script?

maps = {game.ServerStorage.math.random}
maps:Clone(#maps.random)
maps.Parent = Workspace

I know, I know. It's way out of the ball-park, like what am I even doing? I'm currently really stuck on how to choose a random map out of the ServerStorage. And then it clones it to Workspace. Please help!

1 answer

Create An Empty Model and Call it Maps and put it into Server Storage Place All Your Maps Inside that Model

h = Instance.new("Hint", game.Workspace)
	maps = game.ServerStorage.Maps:GetChildren()
	ranGame = math.random(1, #maps)
	gameChosen = maps [ranGame]
	h.Text = "Map Chosen: " .. gameChosen.Name
	wait(3)
	gameChosenClone = gameChosen:Clone()
	gameChosenClone.Parent = game.Workspace

That Should Work If Tell me if it doesnt

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