Detect if left and right mouse button were pressed at same time?

Howdy developers! So, I am working on throwing system for my game and I want to make it so when you press left and right mouse button at the same time, you throw item currently holding, but I don’t know how to check if left and right mouse buttons were pressed at same time.

When someone clicks either the left and the right mouse button, you can use tick() to create a timestamp. And once they click the other button, just compare the timestamp to the current tick() to see how long it took between each click. And if the time is very low, it will mean they were clicked somewhat at the same time.

2 Likes