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

Is it possible to play sounds locally?

I was wondering, is it possible to play sounds locally? For instance, in a local script, could I do

local S2 = game.Workspace:WaitForChild("Sound2")

S2:Play()

--Without it failing?

Please answer!


2 answers

Sounds can work locally,

For the sound to be heard ONLY by the player you can place them in the playergui, or in the character's head.

If you don't want it to stop if they die, put it in the player itself.

You can play the sounds using a localscript.

You Can Use A LocalScript OR a ServerScript to play sounds locally.

Playing the sound in workspace will only play it for everyone.

You want to play the sound in the individual player. Example:

game.Players.PlayerAdded:connect(function(plr)
	S2 = workspace:WaitForChild("Sound2")
	S2.Parent = plr
	S2:Play()
end

Remember, you can use this in LocalScript OR ServerScript.

1 comment

0

Okay, but if i were to want to make a sound stop locally when something isclicked, and another locally play, what would i do

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