Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Hey everyone,
- this was an old video so there were some bugs.
- If the sound is playing when you respawn then turn off playonremove in the damage sound and use this script instead.
- --]]
- local plr = game.Players.LocalPlayer
- local char = plr.Character
- local humanoid = char.Humanoid
- local oldHealth = humanoid.Health
- local sound = char:WaitForChild("DamageSound")
- humanoid.HealthChanged:Connect(function(health)
- if oldHealth > health then
- local newSound = sound:Clone()
- newSound.PlayOnRemove = true
- newSound.Parent = char
- newSound:Destroy()
- end
- oldHealth = health
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement