not the best title, but here’s the script:
for _,button in pairs(visibleFrame:GetChildren()) do
if button:IsA("TextButton") then
button.MouseButton1Click:Connect(function()
print("e")
if button:GetAttribute("Selected") == true then
button:SetAttribute("Selected", false)
button.BackgroundColor3 = Color3.new(0.352941, 0.352941, 0.352941)
elseif button:GetAttribute("Selected") == false then
button:SetAttribute("Selected", true)
button.BackgroundColor3 = Color3.new(0,1,0)
end
end)
end
end
so heres a video:
as you can see does what its supposed to you can select and unselect it, however when you go to another category and go back it just breaks and i dont know why
the categories are each different frames btw, but i dont think its an overlapping issue because ive tried moving the other frames out of the way and it still does this