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: on death play sound?

Previous Thread :: Next Thread 
Grates is not online. Grates
Joined: 25 Mar 2010
Total Posts: 5934
09 Mar 2015 04:06 PM
New to scripting searched it up everywhere, can't find out how to do this. I want it so when you die a sound plays, preferably the sad airhorn song.

I'm not sure why this doesnt work.

if game.Players.LocalPlayer.Character.Humanoid.Health == 0 do
s = Instance.new("Sound")
s.Name = "SadAirhorn"
s.SoundId = "http://www.roblox.com/Asset/?id=168209643"
s.Volume = 1
s.Looped = false
s.archivable = false
s.Parent = game.Workspace
wait(0)
s:play()
end

Help?
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
09 Mar 2015 04:08 PM
game.Players.LocalPlayer.Character.Humanoid.Died:connect(function()

Give me suggestions on the sniper rifle in this game: [http://www.roblox.com/Animations-place?id=200667607]
Report Abuse
Grates is not online. Grates
Joined: 25 Mar 2010
Total Posts: 5934
09 Mar 2015 04:28 PM
Thanks ill try it.
Report Abuse
Grates is not online. Grates
Joined: 25 Mar 2010
Total Posts: 5934
09 Mar 2015 04:34 PM
nope didnt work
Report Abuse
parkiet3 is not online. parkiet3
Joined: 16 Jul 2011
Total Posts: 832
09 Mar 2015 04:36 PM
*FacePalm*
Report Abuse
Grates is not online. Grates
Joined: 25 Mar 2010
Total Posts: 5934
09 Mar 2015 05:14 PM
bump
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