I keep getting this error: ServerScriptService.Main.RoundScript:31: invalid argument #2 to ‘random’ (interval is empty)
local availableMaps = {}
for _, map in pairs(maps:GetChildren()) do
if map.Settings.Difficulty == flood.intensity then
table.insert(availableMaps,map)
end
end
local chosen = availableMaps[math.random(1,#availableMaps)]
this is a map script where it picks maps with the same intensity.
if someone can fix this error i will be very thankful
#2
The conditional statement you put in the loop wasn’t satisfied, so you could check with a print statement before the condition to debug whether two values are true.