Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

localplayer sound script that only that player hears?

Asked by 7 years ago

is there a way to clone a sound from Lighting or wherever and then paste it into the localplayer and if like an event triggers the sound plays itself like:

Sound = game.Lighting.Sound
game.Players.LocalPlayer.Character.Humanoid.Health.Changed:connect(function()
 Sound:Play()
end)    

and is there a way so only that person can hear it? im kinda stuck here

1 answer

Log in to vote
0
Answered by 7 years ago

You can use the SoundService.

SoundService has a function called PlayLocalSound so you can use that to play your sounds to a specific player only.

Pass the Sound as the argument

Ad

Answer this question