So I have this code where I want that when I click on someone's skull, I'll be teleported to them. Using TuSKe. This isn't working fine. This first issue is that it won't teleport me to that player. for the debug method I used message "%loop-player%", and it says "<none>". Also, when a new player joins the server, and there's a total of 2 players online, it sets 2 skulls in the gui of only that player. What I want to do is to have all the currently online players' skulls displayed in this gui, one by one (without any pagination, I don't need that), and clicking on a skull will teleport the player to the player of the skull. Someone that can correct this script, please?
PS the example Tuke provided here doesn't work.
My script:
PS the example Tuke provided here doesn't work.
My script:
code_language.skript:
on rightclick holding a stick:
create a gui with id "SELECTGUI" with virtual chest with 4 rows named "Select":
set {_n} to 0
set {_player} to number of all players
loop {_player} times:
loop all players:
make gui slot {_n} with loop-player's skull named "&r%loop-player's name%":
teleport the player to loop-player
message "%loop-player%"
close player's inventory
add 1 to {_n}
open last gui to player