I have 3 pads in the Workspace. I made this function to pick 3 random maps and display them on the boards.
The problem is that I don't want the same map to show up on any of the other boards as one board. I've tried a series of solutions, but none have worked.
Does anyone have a simple solution?
function PickRandomCubes()
Picked = {}
for Index,Board in pairs(Workspace.Vote:GetChildren()) do
print(Board.Name)
Maps = game.ServerStorage.CubeMapI:GetChildren()
Map = Maps[math.random(1,#Maps)]
for Index,A in pairs(Picked) do
if Map.Name == A.Name then
repeat Map = Maps[math.random(1,#Maps)] until Map.Name ~= A.Name
end
end
table.insert(Picked,Map)
Board.SurfaceGui.ImageLabel.Image = Map.Value
Board.SurfaceGui.MapName.Text = Map.Name
end
end
