I want to make a game in which, by clicking on the button from "Server Storage", the game will randomly select one of 3 levels. The first will be "level1", the second "level2", the third "level3". In this case, x of the level chosen by the random should be shifted by "20" (relative to the button). I don’t know how to write it, but I have a simple script that from "Server Storage" clones "level1" and transfers it to the middle of the map.
function onClicked ()
local level = game.ServerStorage.Level1:Clone()
level.Parent = game.Workspace
level.Position = Vector3.new(0, 0.5, 0)
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
The only thing that causes me difficulties is a random choice from three levels of one, and moving this level "20 x" relative to the button.
Each level is made of bricks and is in the model. All three levels are anchor. Can collide is on.

1 comment
Yes, you understood correctly. Thanks for the help.