Tool.Unequipped isnt firing properly
local MotorGrip = nil
local function GripFunction(State)
local OldGrip = RightArm:WaitForChild("RightGrip")
if State == true then
MotorGrip = Instance.new("Motor6D", Torso)
MotorGrip.Name, MotorGrip.Part0, MotorGrip.Part1 = "RightGrip", Torso, Handle
elseif State == false then
if MotorGrip then
DebrisService:AddItem(MotorGrip, 0)
MotorGrip = nil
end
end
OldGrip.Enabled = false
end
local function Equip()
GripFunction(true)
end
local function Unequip()
GripFunction(false)
end
Tool.Equipped:Connect(function()
Equip()
warn("EQUIP")
end)
Tool.Unequipped:Connect(function()
Unequip()
warn("UNEQUIP")
end)