Props automatically nocollide when physgunning

Hello, how would I go about making props nocollided when they’re physgunned, and go back to collided when they aren’t physgunned?

P.S I’m kind of a lua noob. thx

You could use

GM:PhysgunPickup and

GM:PhysgunDrop hooks and set the collision group of the entity using

Entity:SetCollisionGroup.

Entity:SetCollisionGroup

Set collision group to none when a player does

GM:PhysgunPickup

GM:PhysgunDrop

EDIT: ninja’d