local phys = button3:GetPhysicsObject()
if phys and phys:IsValid() then
phys:EnableMotion(false) -- Freezes the object in place.
end
button3.permalocked = true
function PermaLock( ply, ent )
if ent.permalocked then return false end
end
hook.Add("PhysgunPickup", "PermaLock", PermaLock)
That will freeze it. As far as keeping it from being unfrozen, you'd need to write some kind of hook that prevents players from using the physgun on it. I have included both in the code above.
The part above the hook, add to your spawn code. As for the hook, just add the function somewhere to a serverside autorun file or init.lua if you're doing a gamemode.