TTT - Change corpse ragdoll?

I’ve been messing around with the code on my TTT server lately and have come up with some pretty neat stuff. One thing I was playing around with is the idea of having certain playermodels dissolve into different ones on death. The main one I have in mind is a sort of shadowy figure playermodel that turns into a darkened skeleton on death… But I’m having a bit of trouble getting it to work. I used this code:


elseif victim:SteamID() == "MY_STEAM_ID" then --Only occurs for me right now, since it's still in testing mode. The else is because this is part of an if statement that handles complete disintegration of bodies when killed by certain weapons.
			local corpse = corpse_find(victim)
			corpse:SetModel( "models/player/skeleton.mdl" )
			corpse:SetColor( Color( 0, 0, 0, 200 ) ) 
		end

Inside a playerdeath hook. It worked… But… Well, instead of an actual skeleton ragdoll like I expected, I got a mess of disjointed bones that twitches in a way that slightly terrifies me. Is there any way to make the new model correspond properly to the old one instead of getting the bones all messed up?

Go to sandbox, and spawn the skeleton model and also put it as player model, then you’ll see the difference and why is that happening.
You’ll see what I mean when you do it.

I just did that, looks fine to me. Aside from the fact that it has no fingerposing, it works just like any other playermodel? I also use it as a separate model on the TTT server and it works fine there as well, including when ragdolled.

It’s beacouse when it’s spawned via the spawn menu, it appears to be a messed up skeleton, but when it was a player model, it just was normal