Why is the left mouse button sometimes unresponsive?

Hi everyone, I just packaged my game and I have noticed that sometimes the left mouse button can be unresponsive and will be responsive if you click it a few more times. This is not just happening here its happening in all my packaged games that use the left mouse button. It only happens in the packaged game not in the editor nor the standalone. Is this a bug?

what kind of script runs when you left click?

I’ve had issues before where if you get an actor by display name, that will be different in build versus editor. I’m sure there are other instances with similar case, but it really depends on your code.

To confirm if it is engine level bug or your own code, you can make a new project with just like the first person controller in it, package that and see if it has same problem.

Basically If I hold down left mouse button a function timer will start and loop when I let go of the left mouse button the timer will stop. (Its basically for firing a weapon)

So I made a new project with the same code, and in the editor its works perfectly along with the standalone; but when I packaged it I get the same problem.

You copied the code from one project to the new one? That doesn’t tell you anything then.

The idea was to confirm that the engine is not the source of the problem, compared to your code implementation. So if you just built your code twice, that doesn’t tell you anything.

In order to figure out if the engine is the problem or your code, you need to build a project that does not have your code in it, but does have left mouse click functions.

I’ll take a guess and say it’s most likely your code, but it’s generally bad practice to make assumptions.
Still, assuming problem is in your code, nobody can debug it without seeing all relevant cod.e