Hello I am encountering a weird problem. The problem is if 2 players join the game (each of them has a Gui button that uses a remote event to serverscriptservice to play a sound). The sound is in their head. If a player leaves the game and rejoins, that player can’t hear the sound the other player is playing.
Any errors in the Output window?
Is there a reason you’re creating the sound object in a local script? If everyone is supposed to hear this sound, I would try creating the sound object in a server script when the player character loads into the game (rather than a local script).
Maybe assign the .Playing bool to true?
although the above response is correct, the creation of the sound should be on the server.
the sound object is in a normal script in starter characterscripts the script is not a local script. The only local script I have is in the button to send a remote event to the script in serverscriptservice to play(). Also When I get 2 players to join if one of them clicks the button and makes the sound and the other player leaves then rejoins you cannot hear the sound for the other player. The player that plays the sound I even clicked the button when the player rejoined to restart the sound.
There are no errors. It works until the player who isn’t making the sound rejoins and now can’t hear it.
Where in my post am I using a local script?? The part I am using a local script is my gui button to send a remote event to a script in serverscriptservice to play()
Also my other script is a normal script not local in startercharacterscripts.
Sorry just an assumption, did you try to set .Playing to true though
if nothing solves it, could drop a minimal repro file so people can test stuff out
Use Player.CharacterAdded on the server and create the sound instance on the server. Currently, you are creating the sound effect locally and if they leave and re-join the local assets will not stay.
That alright
The only issue with having .Playing = true is that the sound will be playing all the time nonstop. I might allow people to edit my place to see if they can find the problem, but I will do that if I can’t find a solution.
Moving the sound in an object instead of the player seems to have fixed this issue.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.