I have made an effort to try and figure it out and I can't. I'm hoping someone will be able to help me else I'll be stuck on this problem for awhile.
Here is the code. Does anyone have any suggestions to stop it from choosing the same map twice in a row?
function chooseMap() --Chooses Map (IN-PROGRESS)
local mapChoice = math.random(1,3)
if mapChoice == 1 then
print("Map 1 got chosen!")
local map = game.ServerStorage.Maps.Map1:clone()
map.Parent = game.Workspace
map:MoveTo(Vector3.new(100,100,100))
--load map 1
elseif mapChoice == 2 then
print("Map 2 got chosen!")
local map = game.ServerStorage.Maps.Map2:clone()
map.Parent = game.Workspace
map:MoveTo(Vector3.new(100,100,100))
--load map 2
elseif mapChoice == 3 then
print("Map 3 got chosen!")
local map = game.ServerStorage.Maps.Map3:clone()
map.Parent = game.Workspace
map:MoveTo(Vector3.new(100,100,100))
--load map 3
end
end

2 comments
Thank you so much! This is exactly what I was looking for. Also, thanks for simplifying it, that's helpful and also just taught me something.
No problem!