Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 02 Oct 2016 12:35 PM |
local sound = Instance.new("Sound") sound.SoundId = "rbxassetid://241397608" sound.Parent = game.Players.LocalPlayer sound.Volume = .6 sound:Play()
Why isn't this playing the sound to the local player only? I DON'T want it to play it to the WHOLE server... |
|
|
| Report Abuse |
|
|
wpled
|
  |
| Joined: 28 May 2011 |
| Total Posts: 413 |
|
| |
|
|
| 02 Oct 2016 12:40 PM |
local gui = Instance.new("ScreenGui",game.Players.LocalPlayer.PlayerGui) gui.Name = "Sounds"
local sound = Instance.new("Sound") sound.SoundId = "rbxassetid://241397608" sound.Parent = gui sound.Volume = .6 sound:Play()
#code error('requires dev') |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 02 Oct 2016 01:09 PM |
| it's in a tool so will it still work? |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
| |
|
|
| 02 Oct 2016 01:17 PM |
If its in a tool, only players near it will hear it. So put it in the tool if you want others to hear it if they're near by it. Or you could make it where the local player is only able to hear it, by using the format I gave you.
#code error('requires dev') |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 02 Oct 2016 02:08 PM |
| no. for some reason it's making the whole server hear it even though it's in the tool, I want only players AROUND it to be able to hear it, rather than the whole server. |
|
|
| Report Abuse |
|
|
DevDays
|
  |
| Joined: 16 Dec 2015 |
| Total Posts: 112 |
|
|
| 02 Oct 2016 02:29 PM |
If you put the script under the tool directory then it'll play on the entire server.
If you put the sound under any "BasePart" (aka Part, Bricks bla bla bla) the sound will play nearby.
If you put the sound under the PlayerGui, Camera (or if you run it in a LocalScript with FilteringEnabled) then the sound will play on the client.
kappa |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 02 Oct 2016 02:37 PM |
| # ### the sound to play under bricks then it ends up not playing, it only play when # make it play globally to the whole server.. I want it to play under handle which it WONT do for some reason.. |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 02 Oct 2016 02:43 PM |
the sound has to be in the handle of the gun.
|
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 02 Oct 2016 02:45 PM |
| It is, i'm doing everything, it's not working |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 02 Oct 2016 02:57 PM |
if you look at any free mod gun you will see how to do it
|
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 02 Oct 2016 03:02 PM |
I know, i'm copying that, it's just not working, also the sound only plays after you've gained +1 in "Gold" which is a leaderstat.
And for some reason it only plays globally and when I parent it to Handle, it stops playing, but I need it to play outta handle.. |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
| |
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
| |
|