Trouble with executing actions when I clicked on button

  • 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 community!

    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.

Dani214

Member
Feb 9, 2020
16
1
3
Hello, I need a help.
Yesterday I've created a skript which should when I clicking on minecraft button IN
certain location (wooden/stone no matter) setting/deleting a block which I need in another location.

But when I try to click on the button, nothing happens. (I think, my coordinates is incorrect but I have already checked it by dint of F3. I dunno how to do correct coordinates because when button located below, I mean that it is not on the wall, but on the block it's works. But when I try set it on the wall it stops working.

sk:
Code:
on right-click on button:
    if location of clicked block is location at "ON SCREEN" of the world "world":
        wait 1 second
        set block at location at 32.9, 10, -18 in world "world" to air
        play critical hit at location of player to all players
        play sound "block.dispenser.dispense" with volume 1 at player   
        Set {_time} To a random integer between 7 And 15
        Set {_end} To "%{_time}% seconds" parsed as a time span
        Wait {_end}
        play sound "block.dispenser.dispense" with volume 1 at player
        set block at location at 31, 8, -18 in world "world" to mossy cobblestone

This not works:
upload_2021-3-8_13-22-55.png

[doublepost=1615633624,1615202617][/doublepost]UP!!!!!!!!!!!!!!!!!!!!!!!
 
Status
Not open for further replies.