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%}