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

How do i make a sound when a player dies? (CLICK FOR MORE)

Asked by 10 years ago

how do i make a sound when a player dies? like in game THE MADE MURDER but no one hears it but you

1 answer

Log in to vote
4
Answered by
Azarth 3141 Moderation Voter Community Moderator
10 years ago
Edited 5 years ago

Put it in StarterGui or StarterPack, there's not much to explain, so I trust you can read it and figure out what I did.

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:wait()
local hum = char:WaitForChild("Humanoid")
local sound = Instance.new("Sound", script.Parent)
sound.SoundId = "rbxasset://"..0000000

hum.Died:Connect(function()
    sound:Play()
end)
1
Azarath, lol your at 99 , hmm, this seems correct. MK HexC3D 830 — 10y
2
So plus 1 from me. HexC3D 830 — 10y
0
thanks imcoollikecool 8 — 10y
Ad

Answer this question