So I have recently started coding skript, and i just made a gui where I can choose kits, and I wanted to make many different pages for it, so I coded this.
But when I open it in-game using the kit selector, I click the Next Page button but it just closes the menu and does nothing.
code_language.skript:
on right click:
if held item is iron sword named "&eKit Selector &7(Right Click)":
open chest with 3 rows named "&eKit Selector" to player
wait 1 tick
format slot 2 of player with iron helmet named "&eKit &aPvP" to close then run [execute the player command "/kitPvP"]
format slot 4 of player with diamond chestplate named "&eKit &cTank" to close then run [execute the player command "/kitTank"]
format slot 6 of player with bow named "&eKit &bArcher" to close then run [execute the player command "/kitArcher"]
format slot 11 of player with iron sword named "&eKit &6Combo" to close then run [execute the player command "/kitCombo"]
format slot 13 of player with diamond helmet named "&eKit &dDonator" to close then run [execute the player command "/kitDonor"]
format slot 17 of player with green stained glass named "&aNext Page" to close then run [execute the player command "/KitsPageTwo"]
command /KitsPageTwo:
trigger:
open chest with 3 rows named "&eKit Selector" to player
wait 1 tick
format slot 2 of player with diamond helmet named "&eKit &dDonator" to close then run [execute the player command "/kitMaster"]