It's my first time writing a script from scratch, but it wont work, and I get an error. Any idea on how to fix? This is will be used for my Serious Sam game, by the way.
function() findfirstchild(Humanoid)
if humanoid.Health = -50 -- If the player looses 50 health, then the sound in the script will play only for a split second.
then
sound3:(play)
wait(0.5)
sound3:(stop)
end
end
if findfirstchild(Humanoid)
if humanoid.Health = -25
then
sound2:(play)
sound2:(play)
wait(0.5)
sound2:(stop)
end
end
if findfirstchild(Humanoid)
if humanoid.Health = -10
then
sound1:(play)
sound1:(play)
wait(0.5)
sound1:(stop)
end
end
if findfirstchild(Humanoid)
if humanoid.Health = -75
then
sound4:(play)
sound3:(play)
wait(0.5)
sound4:(stop)
end
end

4 comments
Yes. I want it to scan for a change in the Humanoid's health.
Yes but you also have other mistakes in your script too. You can go to wiki if it helps.
Hmm...I don't know how to program it, though. It's my first script. lol
I see... Here look at this link, see if it helps. http://wiki.roblox.com/index.php?title=Function_Dump