What's wrong with this script?

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

Can you send me your gui and coordinates of a chest? You just have to check the event block coordinates when player is right clicking. Its not that hard.

EDIT: With event block i mean target block.
[doublepost=1637669062,1637653624][/doublepost]For example:

on right-click: #on only right click event.
if location of target block is location at 100.5, 0.5, 190.5 of the world "world": #Checks target block coordinates in world "world".
cancel event
make player execute "/yourguicommandhere" #opens the gui.
[doublepost=1637689253][/doublepost]@TheCringleYT
 
As
Hello.

Can you send me your gui and coordinates of a chest? You just have to check the event block coordinates when player is right clicking. Its not that hard.

EDIT: With event block i mean target block.
[doublepost=1637669062,1637653624][/doublepost]For example:

on right-click: #on only right click event.
if location of target block is location at 100.5, 0.5, 190.5 of the world "world": #Checks target block coordinates in world "world".
cancel event
make player execute "/yourguicommandhere" #opens the gui.
[doublepost=1637689253][/doublepost]@TheCringleYT

As said above you can just check for the coords and then do as followed, but there are better methods (Assuming your new to skript), instead of checking the coords you can just check the name of the event-block

If youre not new then you could do
Code:
on right click:
   if location of event-block = location(0, 0, 0, player's world): # (if name of event-block = "name") to check the name I think
       #Here you could call for a function instead of executing a command or simply just create the inventory here
 
Status
Not open for further replies.