This extremely short and easy script cause an error.
local tool = script.Parent tool.Equipped:connect(function(mouse) tool.Activated:connect(function() print(mouse.Target) end) end)
At first when the tool was equipped and activated by a player then the functions work correctly as it should.
But when they reequip it and activate it again. The mouse will deactivate itself and cause an error
Have you tried putting this in a local script:
local tool = script.Parent local mouse = game.Players.LocalPlayer:GetMouse() tool.Activated:Connect(function() print(mouse.Target) end)