Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 8 years ago

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?

0
Delete the part witch plays the sound SH_Helper 61 — 8y
0
@SH_Helper Would that be located in the Character of the player? fahmisack123 385 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago
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

0
Okay, thanks @Depression, but would this be put in a local or just a plain script? I'm only a novice at this ._. Scancilen 15 — 8y
0
It shouldn't matter DepressionSensei 315 — 8y
Ad

Answer this question