I do concerts in-game and I use a TextButton on my screen to play music, but for some reason, some people are complaining that they can’t hear the music at all and some people say they hear the music fine. I don’t know if this is a ROBLOX bug, but how can I ensure that everyone hears the sound at the same time with no errors?
Here is the code I am using to play the music:
function Music()
game.Workspace.Rollin:Play()
end
script.Parent.PlayAnim.MouseButton1Click:connect(Music)
I’m assuming since you’re using this for the GUI, you must be using local script. In that case, local script only do changes to the client (the specific user, aka you). So when you click the button, you are the only person who hears the music.
You need a server script instead to play the music so everyone can hear it.
I should’ve been more specific, I am using a server script, but for some reason when I click the TextButton, only some people can hear it and other people cannot. Sorry for confusion.
StarterGui only places the guis locally, which means anything in StarterGui will go into the PlayerGui which do not replicate to the server, you technically cannot use a server script in a StarterGui, use a local script instead, or make a remote to replicate to the server.