How to Select 3 Random Parts from a Folder Without Duplicates for a MapVote System

hello. i am trying to do what the title says but i dont know how to do it since math.random can have duplicates, so how would i make it exclude already chosen ones? like

math.random(1,exclude(map1, map2))

You can create a seperate table in your script specificing all choosen maps and use a repeat to select a random map. Then you can verify that the map has not already\ been chosen by using an if statement and have this process repeat until the number of SelectedMaps is whatever you want it to be.

local MapsFolder -- Set to wherever your map folder is
local SelectedMaps = {}

repeat
    local randomMap = MapsFolder:GetChildren()[math.random(1, #MapsFolder:GetChildren())]

    if not table.find(SelectedMaps, randomMap) then
        table.insert(SelectedMaps, randomMap
    end
until #SelectedMaps >= 3