ok so im making a gui that when you click it music plays. theres going to be a lot of these gui's. the thing is the music wont play. heres the code:
local button = script.Parent
local sound = button:WaitForChild('Sound')
sound:Play()
local function onButtonClick()
if sound.IsPlaying then
sound:Stop()
else
sound:Play
end
end
button.MouseButton1Click:connect(onButtonClick)
ok so the script the other guy gave me work...but now when ever i enter the game the music plays without me clicking the gui.

5 comments
That too XD
What parenthesis
only one prob the music plays at the begining of the game
on line ten you didn't put the () after :Play :P
ok XD