Im trying to make a table loop through all the image buttons inside a gui frame, and if the name of that button is the same as 1 of 3 values already set in the script then it would be outlined with a colour, however it seems to be outlining every image button inside the gui as long as one of the imagebuttons shares the same name as one of the values
This is my code:
print("equipped; 1: "..equipped1.." 2: "..equipped2.." 3: "..equipped3.."// slctlvl = "..selectedlvl)
for i,v in pairs(KS:GetChildren()) do
if v:IsA("ImageButton") then
if v.Name == equipped1 or equipped2 or equipped3 then
v.BorderColor3 = Color3.fromRGB(255, 255, 127)
print(v.Name)
end
end
end
In game the output look like this: (See how it prints both Example and Two despite only Two being equipped (And so it shouldnt print, as that print is under the if v.Name == line)
Any help would be appreciated, I dont use tables often so I wouldnt be suprised if its something simple, I just cant see it.