ok so my issue is im finding the highest number in my table and that is working fine but once the script iterates again the old values are still there obviously, so i have to delete them but for some reason i cant figure out how and i have tried 2 methods the first was using table.remove and the second was deleting key by key
Script:
local Screens = script.Parent.MapVotingScreens:GetChildren()
local AlsoScreens = script.Parent.MapVotingScreens:GetDescendants()
local highest = 0
local nums = {}
while wait(.5) do
for x,y in pairs(Screens) do
local Votes = y.Votes
table.insert(nums,Votes.Value)
for i,v in pairs(nums)do
if v > highest then
highest = v
for k,d in pairs(AlsoScreens) do
if d:IsA("SelectionBox") then
d.Visible = false
end
end
y.SelectionBox.Visible = true
end
end
nums[x] = nil --table.remove(nums,x)
end
end

2 comments
Try using a for loop for every value inside of the nums table and remove each one like that? Or couldn't you just set nums back to {}?
setting back to {} didn't work and let me try that for loop real quick