Hello, I making an Fps game so How do you add a cooldown/Delay so the players don't abuse the system there is an image button that's once pressed it shows up a Gui frame, the button scripting is quite simple
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Frame.Visible = true
end) --Please Note this is a **local script**
So how do you add a 30 secs or a minute cooldown until you can access it again?
and if the player tries to press the button while the button is in cooldown a script will play [Sound]
which is this game.SoundService.Barret_Equip.Playing = true and when the button is NOT on cooldown the sound plays game.SoundService.Bell.Playing = true
Sorry if I am asking for too much

4 comments
Yes this helped alot, but where do you put the else statement so if the player presses while the cooldown is on a sound plays?
I stated that below my block of code
I’m sorry if I’m just batting in but does this work on any GUI?
Yes