When you kill a monster in my game, I use the "on death" event for the health + attribute script to spawn a ragdoll of the monster, however the ragdoll always seems to spawn in at some weird angle, and not the angle of the prefab. What can I do about this? Thank you!
No, as you see in the code, it will always take the rotation of the character. Instead of spawning your ragdoll directly, you could write a spawner that spawns the ragdoll in whatever position/rotation you need it. Then you spawn an object with the spawner attached.
So this spawner script would attach to the ragdoll prefab, then when the Health death event script spawns in the ragdoll prefab the spawner script attached to it would put it in proper place?