-- This script seems correct to me (just starting out) what have I done wrong? Button = script.Parent music = script.Parent.Sound
music = false music = true
function onClick()
if music == false then
music = true
music:Play()
elseif music == true then
music = false
music:Stop()
music = true
music = false
end
end
Button.ClickDetector.MouseClick:connect(onClick)

2 comments
Could you make the entire script in Lua format rather than just the middle of it? I could help you further if it's formatted correctly
is there a need for lines 11 and 12