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 » Scripting Helpers
Home Search
 

Re: Play music just for one player to hear?

Previous Thread :: Next Thread 
DevRoboticTerrorist is not online. DevRoboticTerrorist
Joined: 03 Oct 2012
Total Posts: 3464
20 Sep 2014 07:38 AM
I thought doing this would work but I guess the ROBLOX's sound system is set up funny...

Music = Instance.new("Sound")
Music.SoundId = Numbers
Music:Play()

Everyone can hear this and what i'm looking for is every player that joins the game hears it privately until the song is over.
Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
20 Sep 2014 07:41 AM
Make the event when player joins the game, and then put the sound into it's PlayerGui and then play it.
Report Abuse
djwill619 is not online. djwill619
Joined: 13 Jun 2011
Total Posts: 756
20 Sep 2014 07:45 AM
game.Players.PlayerAdded:connect(function(newPlayer)
Music = Instance.new("Sound", newPlayer:WaitForChild("PlayerGui"))
Music.SoundId = Numbers
Music:Play()
end)
Report Abuse
DevRoboticTerrorist is not online. DevRoboticTerrorist
Joined: 03 Oct 2012
Total Posts: 3464
20 Sep 2014 08:05 AM
@DJ and dav

Didn't work. Theres a line under music but that's just a variable so I don't really understand why that would happen....

https://twitter.com/Robo_Terrorist/status/511475119185612800
Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
20 Sep 2014 08:10 AM
game.Players.PlayerAdded:connect(funtion(player)
sound = Instance.new("Sound", player.PlayerGui)
sound.Pitch = 1 --If you want to change Pitch...
sound.Volume = 0.5 --If you want to change volume...
sound.SoundId = "http://www.roblox.com/asset/?id=32578003" --NOTE, THE NUMBERS IS A DECAL ID! CHANGE THE NUMBERS TO YOUR SOUND'S ID!
sound:play()
end)
Report Abuse
DevRoboticTerrorist is not online. DevRoboticTerrorist
Joined: 03 Oct 2012
Total Posts: 3464
20 Sep 2014 08:31 AM
@dav

Still says something is wrong with the variable

https://twitter.com/Robo_Terrorist/status/511475119185612800
Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
20 Sep 2014 02:49 PM
can you tell what output says? Maybe that would help...
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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