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:
- Set value of bool value inside localscript
- Add invisible block inside the part and set the cancollide ( for those who tried spam clicks on a part )
- 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.