Gravgun pickup MOVETYPE_NONE and strength

I need for the gravgun to be able to pickup the prop that i used this code on.

[lua]
function GM:GravGunPunt( ply, target )
target:SetMoveType(MOVETYPE_NONE)
end
[/lua]

^^Works like a charm

I have tried this script below but it doesn’t work for picking it up agan.

[lua]
function GM:GravGunOnPickedUp( ply, target )
target:SetMoveType(MOVETYPE_VPHYSICS)
end
[/lua]

Also, how do i change the strength of the Gravgun so it can pickup anything.

If enabling movetype doesn’t seem to work, try one of two things:

  1. Get the entity’s physics object and use **[PhysObj.EnableMotion

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=PhysObj.EnableMotion)**

  1. **[Constraint.Weld

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Constraint.Weld)** it to the world

With enable motion its this yeh?

[lua]
function GM:GravGunOnPickedUp( ply, target )
PhysObj:EnableMotion( target, enable )
end
[/lua]

Weld would stop me being able to pick it up, not make me able to though :S

[editline]12:05AM[/editline]

I’m now using this but it doesn’t work (the unfreeze)

[lua]
function GM:GravGunPunt( ply, target )
target:SetMoveType(MOVETYPE_PUSH)
end

function GM:GravGunOnPickedUp( ply, target )
PhysObj:EnableMotion( target, enable )
end[/lua]