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

Client Side Audio?

How would I make a sound play for just a certain player (client side) instead of playing for the whole server?

1 answer

✓ Accepted answer

Just put the audio inside of the player and play that audio. This way only you hear the audio but not other players. To put the audio inside of the player, either put the audio in startergui/starterpack or clone and parent it to the player.


#Final Product This one does both, cloning and pasting and also looking for an audio already inside the player.

--Local Script
local audio = Instance.new("Sound")
local name = "Sound1"
local Id = 00000 --SoundId
local plyr = game:GetService("Players").LocalPlayer
if not plyr:FindFirstChild(name) and not plyr:FindFirstChild(name).SoundId = Id then
	audio.Parent = plyr
	audio.SoundId = Id
	audio.Name = name
end

Hope it helps!

1 comment

0

Thank you so much :D.

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