So, this is an issue I've come across multiple times working on different commands and projects, and each time I would just shelve this part for later thinking it was just some syntax or wording errors I had in the codes, but at this point I've tried every different phrasing and syntax and whatever I can think of and it's still not working. Basically, whenever I try to code a gui, no matter what I do, when I click on the items nothing happens even though I have specified for some command or another to happen. There are no errors when Skript starts and there are no error messages showing on the console when I click on the items. The gui doesn't even close, the item just pops back into its slot and nothing happens. I've tried simplifying it to the most basic commands just to see if it was having trouble properly adding placeholders into the commands but to no avail. I'll post the code of the thing I'm currently working on to give an idea of what the gui should be doing:
Ideally the command will open a gui that shows all the online players' heads and when you click on one you will join that player's scoreboard team. The gui opens fine and the player heads show up fine (thank you Donut) but clicking on them does nothing. I'm not even sure if the command in this snippet would work properly because I don't know if that's the proper way to insert variables into commands but I can't really test it because no commands I replace it with will work. Thank you in advance for any help!
Skript Version: Skript 2.2 bensku-dev32d
TuSKe Version: TuSKe 1.8.2
code_language.skript:
trigger:
open virtual chest with 3 rows named "Team Picker" to the player
loop all players:
set {_slot} to 0
add loop-value to {_players::*}
format gui slot {_slot} of player with {_players::*}'s skull to close then run player command "/scoreboard teams join {_players::*} %player%"
add 1 to {_slot}
Ideally the command will open a gui that shows all the online players' heads and when you click on one you will join that player's scoreboard team. The gui opens fine and the player heads show up fine (thank you Donut) but clicking on them does nothing. I'm not even sure if the command in this snippet would work properly because I don't know if that's the proper way to insert variables into commands but I can't really test it because no commands I replace it with will work. Thank you in advance for any help!
Skript Version: Skript 2.2 bensku-dev32d
TuSKe Version: TuSKe 1.8.2