What do you want to achieve? Keep it simple and clear!
I would like to make a working cooldown for my report system to prevent spam.
What is the issue? Include screenshots / videos if possible!
Im not sure how to and I made a script but doesnt work.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I did my research.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you! This script is in the gui sent button.
local reportEvent = game.ReplicatedStorage.Remotes.ReportEvent
local sendReport = script.Parent
local playerNameText = sendReport.Parent.NameText
local reasonText = sendReport.Parent.Reason
local canreport = true
sendReport.MouseButton1Click:Connect(function()
reportEvent:FireServer(playerNameText.Text, reasonText.Text)
script.Parent.Text = "Sent (60s cooldown)"
canreport = false
wait(60)
script.Parent.Text = "Report"
canreport = true
end)```
[image|690x406](upload://utg7XttnTdY1PjmozRFrnxk6Aeo.jpeg)
I recommend you make a bool value inside the player (not a leaderstat) which is the cooldown value of the report button, then in the server script, check if the player didnt report already if plr.Reported.Value == false then... and do whatever you want to do, i also dont reccomend checking if they have reported on the local, people can just change the values with hacks