I need help with safe inventory

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

ConstiBuild

Member
Jan 2, 2024
1
0
1
Hello guys, I have a problem with my script. I want it to load a saved inventory, but it only loads the first slot. Why is that?
on inventory click:
if event-inventory = (metadata tag "events" of player):
loop 41 times:
player's world = "Hub"
clicked slot is 13
teleport player to {location::%player's uuid%}
set player's health to {heal::%player's uuid%}
set player's food level to {food::%player's uuid%}
set slot loop-number -1 of player to {inventory::%uuid of player%::slot::%loop-number%}