Update prop physics


	
function ENT:Use(Activator, Caller)
        useCount = useCount + 1
	timer.Simple(0.2, function() useCount = 0 end)
	if (useCount == 2 && !uprightCD) then
		print(uprightCD)
		uprightCD = true
		local ang = self:GetAngles()
		local pos = self:GetPos() + Vector(0, 0, 5)

		self:SetAngles(Angle(0, 180 + caller:GetAngles().yaw, 0))
		self:SetPos(pos)
		timer.Simple(5, function() uprightCD = false end)
	end
end

Everything is working the way I want it to, except when the ent is set upright it stays frozen in the air until gravgunned or touched by the player…

Oops didn’t mean to make a second post

[editline]29th August 2017[/editline]

Fixed it by rewaking the physics.


local phys = self:GetPhysicsObject()
if (phys:IsValid()) then phys:Wake() end