Execute command using GUI item not working!

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

Dlazar

New Member
Feb 20, 2021
5
0
1
Hello
I have a server where I use a navigator clock and skript to navigate between spawn and survival! I have the script written and it worked on an old server, however it won't work on this new one! The problem is that I have formatted GUI slots and added run commands, but when I click on the item in the menu, it doesn't run what it is supposed to! I am using TuSKe for the GUI! Any ideas on how I can make the run command actually work!
With regards,
Daniel Lazar
CEO, Dlazar Servers Co.




Code:
command /menu:
    trigger:
        open virtual chest inventory with size 1 named "Menu" to player
        format gui slot 0 of player with beacon named "Spawn" to run:
            teleport player to location at 11878, 152, 5999 in world "Server_world"
            set the player's gamemode to survival
            clear the player's inventory
            set slot 8 of player to clock named "&cNavigator &7"
        format gui slot 1 of player with iron sword named "Survival" to run:
            teleport player to location at  -46, 70, -22  in world "Server_world"
            #set the player's gamemode to survival

on rightclick holding a clock:
    make player execute "menu"

on join:
    set slot 8 of player to clock named "&cNavigator &7"
on player respawn:
    set slot 8 of player to clock named "&cNavigator &7"

on inventory click:
    if clicked slot = 8:
        cancel the event
on inventory click:
    if clicked slot = 8:
        cancel the event
 

Attachments

  • 2021-09-25_13.53.23.png
    2021-09-25_13.53.23.png
    736 KB · Views: 215
Status
Not open for further replies.