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

BryHunter

Member
Jan 10, 2018
35
2
8
27
How would I create a gui that when a player clicks on an item it opens another gui. Currently when I try the second gui does not work correct, and I tried to use tuske but it does not seem to be working at all
 
Tuske is definitely the way to go, here is a simple example of how you could do it, you could also do it with functions, which is what I would do
code_language.skript:
command /gui1:
    trigger:
        open virtual chest inventory named "GUI1" to player
        format gui slot 1 of player with chest named "GUI2" to run:
            execute player command "/gui2"

command /gui2:
    trigger:
        open virtual chest inventory named "GUI2" to player
        format gui slot 1 of player with stone named "nothing" to do nothing
[doublepost=1533796115,1533796008][/doublepost]here's a sample of it done with a function
code_language.skript:
command /gui1:
    trigger:
        open virtual chest inventory named "GUI1" to player
        format gui slot 1 of player with chest named "GUI2" to run:
            gui2(player)

function gui2(p: player):
    open virtual chest inventory named "GUI2" to {_p}
    format gui slot 1 of {_p} with stone named "nothing" to do nothing
 
Status
Not open for further replies.