So I want to add a sound to a button GUI but when I put this script:
function onClicked(clicked)
script.Parent.Sound:play()
end
script.Parent.MouseButton1Click:connect(onClicked)
--
it doesn’t work, did I do something wrong in this script?
So I want to add a sound to a button GUI but when I put this script:
function onClicked(clicked)
script.Parent.Sound:play()
end
script.Parent.MouseButton1Click:connect(onClicked)
--
it doesn’t work, did I do something wrong in this script?
script.Parent.Sound:Play()
Notice the capitalization. The “Play” must be capitalized. Same with :Connect()
Ah thank you, I thought I did something wrong but seeing this fixed my problem!