Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How could I have a sound effect when your character dies, but rid of the current death sound also?

I already did the sound effect and script ready to play on death. But How would I also be able to get rid of the current ROBLOX death sound so it would ONLY be the sound effect I choose?

2 comments

0

Delete the part witch plays the sound

0

@SH_Helper Would that be located in the Character of the player?

1 answer

✓ Accepted answer
game.Players.PlayerAdded:connect(function(Player)
	Player.CharacterAdded:connect(function(Character)
		if (Character['Head) then
			for _, v in pairs (Character['Head']:GetChildren()) do
				if v:IsA("Sound") then
					if  v.soundId == 'rbxasset://sounds/uuhhh.mp3' then
						v.soundId = ' '
					end
				end
			end
		end
	end)
end)

All of the sounds a character has is store in the character's head. The above code runs through all of the sounds in the character's head, and finds the death animation and sets it to nil. That way, when your character dies, there will be no more cringey stock noise :D

Remember to accept the answer if it helped you

2 comments

0

Okay, thanks @Depression, but would this be put in a local or just a plain script? I'm only a novice at this ._.

0

It shouldn't matter

This discussion is preserved as it was. New answers, comments, and votes are closed.