Hello, I am trying to make a pool so player's can vote for a map but i got into a problem where three ( or less) of them get the names changed but a random one(or more) doesn't.. I can't find the solution could someone help me?
for i,v in pairs(game.ReplicatedStorage.Assets.MapVote:GetChildren()) do
local RandomMap = Maps[math.random(1,#Maps)]
if RandomMap.UsedFV.Value ~= true then
if v:IsA("ImageButton") then
v.MapName.Text = RandomMap.Name
RandomMap.UsedFV.Value = true
end
end
end

1 comment
Just looking, you don't need to have the 1 in your math.random(1,#Maps). You just need math.random(#Maps)