I’m trying to find whether any of the other buttons have been selected by looping through all the buttons to see if they’re a darker color than the normal color.
local function checkForSelection(Frame)
local found
for _, Button in pairs(Frame:GetChildren()) do
if Button:IsA("TextButton") then
if Button.BackgroundColor3 == Color3.new(0.129412, 0.129412, 0.129412) then
print(Button.Text)
found = Button
end
end
end
return found
end
But my code never makes it past the if statement comparing BackgroundColor3 to Color3. I’ve printed what BackgroundColor3 is and it is the exact same as the Color3 value but for some reason the code doesn’t advance.
local function burgerSelection()
if #string.split(MainFrame.Slot1.Text, "") == 0 or #string.split(MainFrame.Slot2.Text, "") == 0 or #string.split(MainFrame.Slot3.Text, "") == 0 then
if checkForSelection(MainFrame.FirstSelection) then
end
else
SendNotification:FireServer("No available slots", "Red")
end
end
I haven’t gotten to that part yet, my biggest priority is to make sure it can identify if it’s that certain color so as of now I’ve manually set the color of one button to that certain color.