SetGravity on a ragdoll

when a player dies, the ragdolls edited gravity seems to get ignored
this is the init.lua file of my gamemode

function GM:DoPlayerDeath( victim, killer, dmginfo )

	run_spectator( victim )
	victim:CreateRagdoll():SetGravity( 0.10 ) --gravity seems to not change
	victim:AddDeaths( 1 )

--ignore this code
if killer:IsValid() && killer:IsPlayer() then
		victim:PrintMessage( HUD_PRINTTALK, "You are DEAD, and you killed yourself, " .. ---- victim:Nick() .. "! 
		killer:AddFrags( -1 )
		victim:PrintMessage( HUD_PRINTTALK, "You are DEAD, " .. victim:Nick() .. "! " .. killer:GetNick() .. " recieved +1 bullets  
		killer:GiveAmmo( 1, "Pistol" )
		killer:AddFrags( 1 )


[gamemodes\run\gamemode\init.lua:71] attempt to index a nil value(Hook: DoPlayerDeath) is called on The SetGravity line
the effect I’m trying to achieve is a slow motion death ragdoll

Doesn’t seem to work on props or ragdolls. Only found it to work on players.

Then, on the client…

Still doesn’t work.

screw the original code

the console command “cl_phys_timescale < 0.0 - 1>” seems to only effect ragdolls

so I just added

game.ConsoleCommand("cl_phys_timescale 0.2 

and done

game.ConsoleCommand() is a serverside function, as you can see by the name of the cvar; “cl_*” it’s a clientside var.

seems to work perfectly

That doesn’t affect gravity though, only makes them move in slow motion.

Doesn’t SV_Cheats have to be “1” for that to work though?