Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a sound that only the local player can hear?

I am doing a script where I activate a "Sound" with the function 'Sound: Play ()', but when it is activated it can be heard by all the players, what I want is that when the player touches the "Part" it is heard activate a "Sound" but only the player who pressed the "Part" can hear it ... I've been checking and I still can not find a way, if anyone knows please explain how I do that. Thank you for reading!

4 comments

0

Play the sound form a LocalScript. That's all to it. Listen for the Touched event from the client and play the sound.

0

it does not work :(, I do all the code and nothing is heard, there are no errors in the script either.

0

What he meant........ A localscript will play a sound from workspace.... It will play only for you since it is local

0

You can try putting the sound in game.Players.LocalPlayer since workspace will likely be serverwide.

1 answer

you can use soundservice's PlayLocalSound function

game:GetService("SoundService"):PlayLocalSound(soundhere)

This discussion is preserved as it was. New answers, comments, and votes are closed.