Solved I Want to make a gun cooldown please help

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Orid

Member
Jun 18, 2020
1
0
1
23
Okay so I'm making this gun server I have a pistol this is the script:
on right click holding a wooden hoe:
shoot arrow at speed 2

But the problem is that it shoots WAY too fast than I want it to, so basically I have to make a cool down and I have no idea how to do that. I tried making a var but I have no idea how to make the var actually do something I've looked everywhere I'm very new to skript so I am kind of stuck can someone please help.
 
Code:
on your event:
    if {cooldown::%player%} is set:
        send "You have to wait!" #optional, not needed
        stop
    #do your stuff
    set {cooldown::%player%} to true
    wait X seconds #your cooldown
    clear {cooldown::%player%}
I think this is the easiest way to do this.
 
  • Like
Reactions: Orid
Status
Not open for further replies.