For a game a friend and I are making, I wanted to add a sort of intercom room for people who purchase a game pass. In the intercom room you would be able to press a button and after pressing the button it would bring up a client-side GUI where you can paste the song ID of the song you want to play across the whole server. Currently I found out how to do this using local scripts but as I have stated, I would like to have the music play server wide rather than on just the client side. The video I had watched said that in order to make the music play on the server-side rather than the client-side, just convert the scripts from local scripts to normal scripts but when doing this, it made the music no longer play at all. Here is the code responsible for making it play (there is a separate thing of code for stopping the music, if you want to see it just let me know):
local button = script.Parent
local box = button.Parent.MusicBox
local music = button.Parent.Intercom
button.MouseButton1Click:Connect(function()
music.SoundId = "rbxassetid://"..box.Text
music:Play()
music.Playing = true
end)
Sorry if I did not explain too well.

1 comment
Use RemoteEvents https://developer.roblox.com/en-us/articles/Remote-Functions-and-Events. Questions? Ping me on the scripting helpers discord