I have this issue where i click every 5 button’s they all turn green but what i expected is that ONLY the Selected Button Value Is Green Everything else is Black but it is not working
Here is the code
local plr = game.Players.LocalPlayer
local CurrentButton = plr:WaitForChild("SelectedButton")
while wait() do
if script.Parent:FindFirstChild(CurrentButton.Value) then
local SelectedButton = script.Parent:FindFirstChild(CurrentButton.Value)
local NotSelectedButton = script.Parent:GetChildren()
SelectedButton.ImageColor3 = Color3.fromRGB(0,255,0)
NotSelectedButton.ImageColor3 = Color3.fromRGB(0,0,0)
SelectedButton.ImageColor3 = Color3.fromRGB(0,255,0)
end
end