Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

What is wrong with my random-map choosing script?

Asked by 10 years ago
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

Log in to vote
0
Answered by 10 years ago

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

Ad

Answer this question