This is in local Script
local Tool = script.Parent
local UserInputService = game:GetService("UserInputService")
Tool.Equipped:Connect(function()
UserInputService.InputBegan:Connect(function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 then print("mouse down") end end)
end)
every time i re-equipped the tool, the click multiplies like the first time i equip and click it adds one to the counter when i re-equipped and click it adds 2 to the counter pls help
it happens bc you are adding an event inside an event, means the second time the Equipped event gets called, you have that function connected twice to InputBegan, so it fires twice, either disconnect the event on unequip or move it out the equip event and add a bool to the if of the inputbegan event that you set to true on equip and false dequip or like the person said in the comments use the tool.Activated event instead of inputbegan
i think the reason is everytime i equipped the tool the UserInput Service fire and looks every second and when i re-equipped it the action doesnt unbind i think