So basically I have a gun and when the player holds down it fires, but not on the first click
--mouse.Button1Down:connect(function()
Tool.Activated:Connect(function()
print("Activation")
if gunMod.isEquipped() then
print("Down")
firing = true;
end
end)
--end)
Tool.Deactivated:connect(function()
if gunMod.isEquipped() then
print("Up")
firing = false;
end
end)
When you equip the tool, nothing is printed, but when you click, only Up is printed after that even if it is unequipped it works correctly.
UserInputService.InputBegan:connect(function(input,processed)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
if gunMod.isEquipped() then
firing = true;
end
end
end)