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?