Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Damage sound script that doesnt work/play sound?

I cant seem to hear this sound even after many tries + i dont think its working how it should

script V

while wait(0.05)do
local gethp=script.Parent.Humanoid.Health
if gethp > gethp 
	then
	local hurt= Instance.new("Sound",script.Parent.Head)
	hurt.SoundId="rbxassetid://209527158"
	script.Parent.Head.Died.SoundId=("rbxassetid://209527158")
	hurt:Play()

end	
end

Can you show me what to do and fix it?

1 answer

✓ Accepted answer

The sound will play, but you won't hear it because it isn't in the physical world. If you want everyone to hear it, parent the sound to workspace, but if you want only one person to hear it, parent it to PlayerGui.

If this helped you please remember to accept :)

2 comments

0

But why i want it to be able tp be played In the head so every one can hear it when they are near my head

0

That's not how sounds work. If you parent it to the head, no one will be able to hear it. If you want people near your head to be able to hear it, then set the MaxDistance property of the sound to the desired number of studs you'd like a player to be near to hear the sound.

This discussion is preserved as it was. New answers, comments, and votes are closed.