I have 8 image buttons that are all grouped under a folder.
I want to make it so that if I press one button, that button has a different colored outline, but if I press a different button the 1st buttons outline changes to what it was before while the other button gets the different color outline.
for i, button in folder do
button.Activated:Connect(function()
local unselected
if unselected and unselected ~= button then
unselected.UIStroke.Color = Color3.fromRGB(130, 118, 26)
end
unselected = button
button.UIStroke.Color = Color3.fromRGB(94, 211, 31)
end)
end
This is the current script I’m using and it only applies the second color to the outlines of the buttons and doesn’t remove it when I press a different button.