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: sound when someone dies

Previous Thread :: Next Thread 
Contouri is not online. Contouri
Joined: 07 Oct 2011
Total Posts: 2792
07 Dec 2015 01:34 PM
how to script that
Report Abuse
bojigglesmister2 is not online. bojigglesmister2
Joined: 26 Jun 2011
Total Posts: 1421
07 Dec 2015 02:01 PM


game.Players.PlayerAdded:connect(function(player)
wait(2)
player.Character.Head.Died.SoundId = "rbxassetid://" -- put the id of the sound u want after //
end)
Report Abuse
NubFeeder is not online. NubFeeder
Joined: 03 Sep 2015
Total Posts: 6
07 Dec 2015 02:06 PM
local soundId = 183073293

local players = game:GetService("Players")
players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
local sound = Instance.new("Sound", character:WaitForChild("Torso"))
sound.SoundId = "rbxassetid://"..soundId
local humanoid = character:WaitForChild("Humanoid")
humanoid.Died:connect(function()
sound:Play()
end)
end)
end)
Report Abuse
bojigglesmister2 is not online. bojigglesmister2
Joined: 26 Jun 2011
Total Posts: 1421
07 Dec 2015 02:07 PM
@Nub, wouldn't that also play the regular character death also?
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