How to check if remote event completed or stopped & more solutions

What I want to do is detect the bool value and do stuff like stop firing remote event or fires it.

ServerScript:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local UserInputService = game:GetService("UserInputService")

script.Parent.ClickDetector.MouseClick:Connect(function (click)
	
	if click and click.PlayerGui.Actions.test.Value == false then
		ReplicatedStorage._ClickIngredient:FireClient(click, script.Parent)
		click.PlayerGui.Actions.test.Value = true
		
	end
	
end)

Note: I’m not going to show the localscript, because it’s too long and nothing wrong inside it.

The Issue is I tried to prevent player spamming clicks on part and broke the game.

The solution I tried so far:

  1. Set value of bool value inside localscript
  2. Add invisible block inside the part and set the cancollide ( for those who tried spam clicks on a part )
  3. Create new ClickDetector / Script or both.

So if there’s a way to make a delay or more solutions please let me know. Also I want to know if remote event can be check if complete or finish firing.

So I dont understand your first question but you can just set a bool in the end of the RemoveEvent function to true and there you can see it. If you want it on the Server, you could use again a RemoteEvent from the ClientSide or just use RemoteFunctions and the ServerScript will wait for the RemoteFunction to be completed.

I tried to set bool value at the end and check if bool value is true inside server script and the result is the bool value is actually checked, but the if statement inside serverscript didn’t read that up (didn’t update info). So I wanted to set bool value inside serverscript so that it can check if bool value was true / false