Picking a random part for each player

Currently creating a round system from some old code, and am wondering how to go about picking a random part for each player to go to.

`if inRound.Value == true then
	
	for i, plr in pairs(game.Players:GetChildren()) do
		
		local char = plr.Character
		local humanRoot = char:WaitForChild("HumanoidRootPart")
		
		humanRoot.CFrame = game.Workspace.mapspawn[math.random(1,7)].CFrame
		
		plr.Team = playingTeam
		
		char:WaitForChild("Humanoid").Died:Connect(function()
			
			plr.Team = lobbyTeam
			
			
		end)
		
	end	
	
else`

this picks a random part out of my “mapspawn” folder, but how do I make it choose randomly for each player instead choosing the same spawn for every player?

i’m new to writing code of any type please help

You could have a “Used” variable for each part, and it only teleports to that one if it’s not used by a player. (Otherwise it chooses another one)