Can anyone help with this audio on death script?
I have an audio on death script right here, and it used to work in the other games I had used it in.
id = "172294682"
t = 10
Game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=172294682")
repeat wait() until game.Workspace:findFirstChild(script.Parent.Parent.Name)
sound = script.Sound
sound.SoundId = "http://www.roblox.com/asset/?id=172294682"
char = script.Parent.Parent.Character
print("TOO BAD")
char.Humanoid.Died:connect(function()
print("Died")
sound:Play()
wait(t)
Sound:Stop()
end)
I have been toying around with it, but no matter what I do, it doesn't seem to work. I have the sound file uploaded and everything else, but I just don't understand what can be causing the problem.