Using an APY helping script and it doesn't drop a weapon but destroys it! How can I prevent weapon from destroying while changing a weapon in the same socket?
Did you use
local EQUIPMENT = script.parent
local TRIGGER = script.parent:FindDescendantByType("Trigger")
-- The pickup trigger needs to be re-enabled (if there is one)
local pickupTrigger = equipment:FindDescendantByType("Trigger")
if pickupTrigger then pickupTrigger.collision = Collision.FORCE_ON end
function OnEquipped(equipment, player)
for _, e in ipairs(player:GetEquipment()) do
if e ~= equipment and e.socket == equipment.socket then
function OnInteracted(trigger, player)
TRIGGER.collision = Collision.FORCE_OFF
Error - can't access destroyed object? How can I prevent weapons from destroying?