So basically ive been working on this game and whenever I click really fast my FPS drops and my ping spikes until I stop clicking. And it isnt just me, Players in my game also experience this and its making players stop playing. Im not the kind of person to ask for help, but I have been trying to figure something out for about a week now and at this point I need some answers. I dont even know where to start because if I join my game, and click really fast I lag for no reason. If anyone has expericned this or has a solution please let me know. Thanks!
COMMUNITY QUESTION
My game is lagging when players click really fast?
1 answer
There is a really simple solution to this, use Debounce to limit the cps.
2 comments
0
I wouldve of been done that but I dont know a way to detect if a player clicked.
0
Roblox has a event that detects when something is clicked for a mouse detector its MouceClick and for a button its a MouseButton1Click. https://developer.roblox.com/en-us/api-reference/event/ClickDetector/MouseClick & https://developer.roblox.com/en-us/api-reference/event/GuiButton/MouseButton1Click.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
What do the clicks cause, IE what action do they trigger, and how do they do it? The reason clicks lag the game is because there's probably a localscript somewhere that's listening for them and doing somthing really intensive (like maybe sending a large amount of data through a remoteevent).
You see thats the problem. If u click on nothing and just click really fast it causes lag. I tried disabling everything in the server script service and every thing in starter character/player scripts and the lag still happened.