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

Deactivated

Fired when the left mouse button is released.


Code Samples


Tool.Deactivated

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)