Tool = script.Parent
local vCharacter
local vPlayer
Tool.Equipped:Connect(function(mouse)
local vCharacter = Tool.Parent
local vPlayer = game.Players:playerFromCharacter(vCharacter)
tagHumanoid(vPlayer)
Tool.creator.Value.Stats.Strength.Value = Tool.creator.Value.Stats.Strength.Value + 50
end)
function tagHumanoid(player)
print("Tagged")
local creator_tag = Instance.new("ObjectValue")
creator_tag.Value = player
creator_tag.Name = "creator"
creator_tag.Parent = script.Parent
end
Tool.Unequipped:Connect(function()
Tool.creator.Value.Stats.Strength.Value = Tool.creator.Value.Stats.Strength.Value - 50
Tool.creator:Destroy()
end)
That should be my code on equip and unequip, however my unequip script involves destroying the weapon in the player character so it doesn't count as unequipped and the unequip function doesn't connect

3 comments
got it, all you have to do is transfer the weapon in character to backpack before destroying it. THANKS :D
You could add a wait like wait(0.1) in the unequipped function
You could add a wait like wait(0.1) in the unequipped function