PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience

Tool.Deactivated

Tool.Deactivated

Oct 01 2018, 1:55 AM PST

The below code, when ran in a test mode with Player1 present, would create a tool in the player’s backpack. It will print “Tool deactivated” when the player releases the left mouse button, while the tool is equipped.

local tool = Instance.new("Tool")
tool.Parent = game.Players.Player.Backpack
 
function toolDeactivated()
    print("Tool deactivated")
end
 
tool.Deactivated:Connect(toolDeactivated)