How to get entities in ClientSide ?

I want to call ply.RagdollEnt @ line 36 in ClientSide
how can I do ?

And also I want to “ApplyForceCenter” when ent is called not when I’m dead.

Thanks in advance.

[lua]if CLIENT then
function PitchRag(ply)
if !LocalPlayer():Alive() && ply then
local ent=LocalPlayer():GetRagdollEntity()

local Head=ent:GetPhysicsObjectNum(10)	
local LeftHand=ent:GetPhysicsObjectNum(5)
local RightHand=ent:GetPhysicsObjectNum(7)

Head:ApplyForceCenter(Vector(0,21000,2900))	
LeftHand:ApplyForceCenter(Vector(0,21000,2900))
RightHand:ApplyForceCenter(Vector(0,21000,2900))

end
end
concommand.Add( “Throw”, PitchRag )

end

if SERVER then

function PlyRagdollize( ply, ent )

local ent = ents.Create( "prop_ragdoll" )

if ent:IsValid() then
	ent:SetModel( ply:GetModel() )
	ent:SetKeyValue( "origin", ply:GetPos().x .. " " .. ply:GetPos().y .. " " .. ply:GetPos().z )
	ent:Spawn()
	ent:Activate() 
	ent:SetVar("ragdollname",ply:Nick().."")
	

	ply.RagdollEnt = ent
	ply:DrawViewModel(false)
	ply:Spectate( OBS_MODE_CHASE )
	ply:SpectateEntity( ent )
	ply:StripWeapons()
	
end

end

concommand.Add(“Ragdollize”, PlyRagdollize)

function Spawn( ply )

local P1 = player.GetByID(1)
local pos = P1:GetPos()
P1:Spawn()

if ValidEntity(ply.RagdollEnt) then
	ply.RagdollEnt:Remove()
			ply:SetKeyValue( "origin", ply.RagdollEnt:GetPos().x .. " " .. ply.RagdollEnt:GetPos().y .. " " .. ply.RagdollEnt:GetPos().z )
end

end

concommand.Add(“Spawn”, Spawn )

end[/lua]

What do you want to do exactly? You can’t create a ragdoll serverside, and then play with its physics clientside. Well, you probably can, but that’s not really recommended.

Well, on line 3 it call when I’m dead ApplyForce on GetRagdollEntity() but I want it only on the prop_ragdoll.