So I tried making a small, hidden button in a place I'm currently working on that plays a certain sound for everyone in the server. The script itself is:
owo = script.Parent
sound = owo:WaitForChild('Sound')
function onButtonClick()
sound:Play()
end
owo.MouseButton1Click:connect(onButtonClick)
The thing is, it doesn't work, like, at all. It doesn't play server-wide or only on the local client. Nothing really happens. Can anyone explain where I've done wrong? I did include a ClickDetector and the sound itself is a child of the button itself. Thanks in advance!

3 comments
forgot to mention, the script is also a child of the button
It should be in a local script if it isn't. If you want it to happen for all players, you should look into remote events.
the place is not FE, but sure, I guess? thanks anyways.