Here is the code I have, I don't know why it isn't working.
Brick = script.Parent
ch1 = Brick.Channel_1
ch2 = Brick.Channel_2
function onClicked()
if Brick.On.Value == false then
Brick.On.Value = true
elseif Brick.On.Value == true then
Brick.On.Value = false
if script.Parent.Channel.Value == "ch1" and Brick.On.Value == true then
Brick.Channel_1:Play()
elseif script.Parent.Channel.Value == "ch2" and Brick.On.Value == true then
Brick.Channel_2:Play()
else
Brick.Channel_1:Stop()
Brick.Channel_2:Stop()
end
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
