generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Why is this doing this?

Previous Thread :: Next Thread 
Mezur is not online. 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 is not online. wpled
Joined: 28 May 2011
Total Posts: 413
02 Oct 2016 12:38 PM
Put it in PlayerGui.


Report Abuse
DevGamerzz is not online. DevGamerzz
Joined: 21 Dec 2015
Total Posts: 154
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 is not online. 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 is not online. Mezur
Joined: 29 Jun 2015
Total Posts: 3040
02 Oct 2016 01:14 PM
b1
Report Abuse
DevGamerzz is not online. DevGamerzz
Joined: 21 Dec 2015
Total Posts: 154
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 is not online. 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 is not online. 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 is not online. 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 is not online. Mezur
Joined: 29 Jun 2015
Total Posts: 3040
02 Oct 2016 02:41 PM
b1
Report Abuse
TimeTicks is not online. 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 is not online. 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 is not online. Mezur
Joined: 29 Jun 2015
Total Posts: 3040
02 Oct 2016 02:54 PM
bumppppppppp
Report Abuse
TimeTicks is not online. 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 is not online. 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 is not online. Mezur
Joined: 29 Jun 2015
Total Posts: 3040
02 Oct 2016 03:04 PM
bump 2
Report Abuse
Mezur is not online. Mezur
Joined: 29 Jun 2015
Total Posts: 3040
02 Oct 2016 03:09 PM
b3
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image