The Conundrum and the Solution
The ones that you hate, though, are the ones that compile. Perfectly. And then you load up Skyrim and it doesn't work. Not at all. So you go through a dozen times, everything seems perfect. Then I remember how incredibly buggy the CK is (how did I even forget?) and redo my entire mod. It still doesn't work.
Then I remember my good friend, the internet. So after I've spent hours pinpointing my problem, I spend another half an hour surfing the web, looking for answers. And after digging through piles of dusty old topics in the Forums, I realize that this is a known issue. The OnDeath() event (the cause of my problems), is crap. It doesn't even work most of the time.
There have been a fair amount of reports of OnDeath not working. I've tried OnDying though, and it actually does work. It has the same parameters and everything (Actor AkKiller). I haven't really been able to discern the difference between the two (besides the fact that one function functions and the other doesn't), aside from a few milliseconds between their firing. So really - use OnDying. It's loads better.
Edit: OnDeath does work, most of the time, it seems. But it has never worked for me, even when I have the simplest scripts like the script below doesn't work. You may have different results, but I still recommend using OnDying, simply because it has proved more reliable. (Both for me, and another user on the Forums. There was a topic there that sparked this post, but I can't find it for the life of me.)
Event OnDeath(Actor AkKiller)
Debug.Messagebox("The death script worked! Wait... Nope.")
EndEvent