1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not sure why my script doesn't work

Discussion in 'Skript' started by Fyriiee, Oct 2, 2020.

Thread Status:
Not open for further replies.
  1. Fyriiee

    Fyriiee Member

    Joined:
    Sep 30, 2020
    Messages:
    26
    Likes Received:
    0
    Code (Text):
    1. on right click:
    2.     if player's tool is snowball:
    3.         if {cooldownsb.%player's uuid%} is false:
    4.             set {cooldownsb.%player's uuid%} to true
    5.             wait 1 seconds
    6.             give player 1 snowball
    7.             set {cooldownsb.%player's uuid%} to false
    Above is my code for my server, which is supposed to give a snowball every time I throw it after 1 second. I have no skript plugins and I'm not sure why the script isn't working. I simply do not receive a snowball. Any help is appreciated :emoji_smiley:
     
  2. bpitcher2013

    bpitcher2013 Member

    Joined:
    Jan 25, 2020
    Messages:
    14
    Likes Received:
    1
    Code (Text):
    1. on right click holding Snowball:
    2.     if player's tool is snowball:
    3.         set {_waited} to difference between {snow.%player%.lastused} and now
    4.         if {_waited} is less than 1 seconds:
    5.             cancel event
    6.             message "&eYou have to wait &a%difference between 1 seconds and {_waited}%"
    7.             stop
    8.         else:
    9.             set {snow.%player%.lastused} to now
    10.             wait 1 second
    11.             give player snowball
    12.      

    this should work stack of 1 snowball only tho hope this helped :emoji_grinning:
     
    • Like Like x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...