Solved Not sure why my script doesn't work

  • 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.

Fyriiee

Member
Sep 30, 2020
26
0
1
17

  1. Skript Version: 2.5-beta2-MH
  2. Skript Author: Fyriiee
  3. Minecraft Version: 1.14.4 but 1.16.3 server
  4. Full Code:
  5. Code:
    on join:
        set {cooldownsb.%player's uuid%} to false
    
    on right click:
        if player's tool is snowball:
            if {cooldownsb.%player's uuid%} is false:
                set {cooldownsb.%player's uuid%} to true
                wait 1 seconds
                give player 1 snowball
                set {cooldownsb.%player's uuid%} to false



  6. Errors on Reload:
  7. none


  8. Console Errors: (if applicable)
  9. none

  10. Other Useful Info:

  11. Addons using (including versions):
  12. none
  13. Troubleshooting:
I can't seem to figure out why this doesn't return a snowball to the player after they throw one. There' has to be a 1-second cooldown. Any help is appreciated!
 

  1. Skript Version: 2.5-beta2-MH
  2. Skript Author: Fyriiee
  3. Minecraft Version: 1.14.4 but 1.16.3 server
  4. Full Code:
  5. Code:
    on join:
        set {cooldownsb.%player's uuid%} to false
    
    on right click:
        if player's tool is snowball:
            if {cooldownsb.%player's uuid%} is false:
                set {cooldownsb.%player's uuid%} to true
                wait 1 seconds
                give player 1 snowball
                set {cooldownsb.%player's uuid%} to false



  6. Errors on Reload:
  7. none


  8. Console Errors: (if applicable)
  9. none

  10. Other Useful Info:

  11. Addons using (including versions):
  12. none
  13. Troubleshooting:
I can't seem to figure out why this doesn't return a snowball to the player after they throw one. There' has to be a 1-second cooldown. Any help is appreciated!
Update your client to 1.16.3, install last version of skript, change "wait 1 seconds" to "wait a second" or "wait 1 second", because skript detect some grammar errors, and try this script again. If doesn't work, come back and post here.

Ahh, and change "give player 1 snowball" to "give 1 snowball to player"
 
Last edited:
Code:
on join:
    set {cooldownsb.%player's uuid%} to false
 
on right click:
    if player's tool is snowball:
        if {cooldownsb.%player's uuid%} is false:
            set {cooldownsb.%player's uuid%} to true
            wait 1 seconds
            add snowball to player's inventory
            set {cooldownsb.%player's uuid%} to false
 
Status
Not open for further replies.