I am trying to make a part that destroys when you click your mouse but i only want it to destroy if the tool is equipped and here is my script:
local UserInputService = game:GetService("UserInputService") local ClickTool = game.StarterPack.ClickTool local DestroyPart = game.Workspace.DestroyPart
ClickTool.Equipped:Connect(function() UserInputService.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then DestroyPart:Destroy() end end) end)