Hello, I would like to know how to make a script that plays a sound when the player has been damaged by anything, like in the script you have a roblox id and you enter the of number of the search number of the sound. Something like when damaged play sound? Thanks for helping me.
This is a help forum, not a request site. However I would still try using a script along the lines of:
-- StarterCharacterScript hum = script.Parent.Humanoid last = hum.Health mysound = Instance.new("Sound", script.Parent) mysound.SoundId = 1337 -- Sound ID hum.Changed:Connect(function() if hum.Health ~= last and hum.Health < last then print("i've been damaged!") mysound:Play() end last = hum.Health end
This script checks to see if the health is less than it was before. If it works let me know please!