I just started scripting last week and im trying to make a brick thats flashing neon red turn to "Institutional white" and stop flashing after the click detector is clicked.
Here is the click detector script. Its not in the same group as the neon flashing red brick.
local cd = script.Parent
local light = game.Workspace.WarningLight
local Button = game.Workspace.Button.Buttn
cd.MouseHoverEnter:Connect(function()
light.Transparency = 0.3
Button.BrickColor = BrickColor.new ("Bright red")
end)
cd.MouseHoverLeave:Connect(function()
light.Transparency = 0
Button.BrickColor = BrickColor.new ("Institutional white")
end)
cd.MouseClick:Connect(function()
light.BrickColor = BrickColor.new ("Institutional white")
end)
Here is the flashing red neon brick script
local part = script.Parent
while true do
wait(2)
part.Material = Enum.Material.SmoothPlastic
wait(2)
part.Material = Enum.Material.Neon
end

2 comments
Is the click detector in a part, if not it will not run, because you need a part to click on.
its in a part, it works but i need to figure out how to disable the second script when the button is pressed