function generateMedKit(name)
local MedKits = game.ServerStorage.MedKits:FindFirstChild(name)
local Cords = {"5, 5, 5","10, 10, 10","20, 20, 20","40, 40, 40","80, 80, 80"}
local randNum = math.random(1,#Cords)
local chosenValue = Cords[randNum]
print(chosenValue)
MedKits.Position = Vector3.new(chosenValue)
MedKits.Parent = game.Workspace
end
generateMedKit("Med1")
generateMedKit("Med2")
generateMedKit("Med3")
I am making random spawns for a medkit across multiple coordinates. Everthing works, however sometimes I get repeat Coordinates. How can I prevent two identical coordinates from being generated.

1 comment
When I used that I just got the same identical coordinates 3 times in a row each time I ran the code.