local Maps = {"Camp", "Factory", "Theater"}
--
function GetRandomMaps()
local AvailableMaps = table.clone(Maps)
local SelectedMaps = {}
for i = 1, 3 do task.wait()
local RandomMap = AvailableMaps[math.random(#AvailableMaps)]
if not table.find(SelectedMaps, 1) then
table.insert(SelectedMaps, 1)
table.remove(AvailableMaps, 1)
if i == 1 then
MapText1.Text = tostring(RandomMap)
print("Got through 1st if")
end
if i == 2 then
MapText2.Text = tostring(RandomMap)
print("Got through 2nd if")
end
if i == 3 then
MapText3.Text = tostring(RandomMap)
print("Got through 3rd if")
end
end
end
end
--
StartVotingEvent.Event:Connect(GetRandomMaps)
This script only goes through with the 1st if
statement. It doesn’t print the next two prints
Any help is appreciated!