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

Is it possible to play sounds locally?

Asked by
Vid_eo 126
8 years ago

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

Log in to vote
0
Answered by 8 years ago

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.

Ad
Log in to vote
0
Answered by 8 years ago

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.

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 Vid_eo 126 — 8y

Answer this question