EDIT (what's with the downvotes? Please read the last sentence, I'm not requesting for a script...)
I'm about to go and script a a coffee machine where you select the coffee type in a column of buttons and the flavoring in another column, and the selected buttons would be highlighted in green. But I only want one button to be selected at a time in a column. I've been brain storming ways on how to do this and all my ideas feel too inefficient. How would I go about scripting this? I don't need you to write any scripts of any kind, I would just like to know the basic layout so I know how to organize it as I'm not that great with script organization.
Hey there!
This is just one method I have thought of while reading your question.
While I will not be providing any scripts, take these into consideration:
script.Parent.Selected.Changed:connect(function (onChange) if script.Parent.Selected.Value then -- Color for selcted else -- Default color end end)
You could then have a master script, which would check all the values, and toggle them
An example:
local Buttons = { script.Parent.Button1, script.Parent.Button2, } function CheckButtons() for _,Button in pairs(Buttons) do if Button.Selected.Value then return true Button.Selected.Value = false end end return false end for _,Button in pairs (Buttons) do Button.MouseButton1Down:connect(function (click) CheckButtons() Button.Selected.Value = true end) end