I have been trying to make this sound play on death. I have tried everything with my meager knowledge of scripting and come up short. Does anyone have any ideas? The code block is the on death function, but i cannot understand anything related to sound. Anyone mind helping me add the play sound function?
game:GetService('Players').PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() print(player.Name .. " has died!") end) end) end)
Try this!
SID = 157707359 -- Sound ID goes here if you ever need to change it. game:GetService('Players').PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() local s = Instance.new("Sound", player.Backpack) s.SoundId = "http://www.roblox.com/asset/?id="..SID s:Play() end) end) end)
Locked by TheMyrco
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?