Skript Version:Not Sure
Skript Author:Not Sure
Minecraft Version:1.12.2
---
Full Code: Most of the code works, it's just this specific part.
Errors on Reload:
none. The problem is when I go through this gui menu and click on the skull, only the part where it freezes the player runs, instead of toggling like I want it to. I have made a command to test to see that the variables were working, so that isnt the problem. Just dont understand why it only runs one part of the skript.
Troubleshooting:
Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? I added the else part to see if the variables were the problem (they arent)
Skript Author:Not Sure
Minecraft Version:1.12.2
---
Full Code: Most of the code works, it's just this specific part.
code_language.skript:
if inventory name of the player's current inventory is "&bFreeze":
clicked item is head
if {freeze.%{_p}%.frozen} is 0:
set {_p} to uncolored item's name parsed as player
set {freeze.%{_p}%.frozen} to 1
set {freeze.%{_p}%.location} to location of {_p}
send "&b%{_p}% has been frozen!" to player
send "&bYou have been frozen!" to {_p}
close player's inventory
cancel event
stop
if {freeze.%{_p}%.frozen} is 1:
set {_p} to uncolored item's name parsed as player
set {freeze.%{_p}%.frozen} to 0
delete {freeze.%{_p}%.location}
send "&b%{_p}% has been unfrozen!" to player
send "&bYou have been unfrozen!" to {_p}
close player's inventory
cancel event
stop
else:
set {_p} to uncolored item's name parsed as player
send "&cWe're sorry! Some how DabbingFoem glitched the freeze command. %{_p}% should be unfrozen." to the player
set {freeze.%{_p}%.frozen} to 0
close player's inventory
cancel event
stop
every second:
loop all players:
if {freeze.%loop-player%.frozen} is 1:
teleport loop-player to {freeze.%loop-player%.location}
Errors on Reload:
none. The problem is when I go through this gui menu and click on the skull, only the part where it freezes the player runs, instead of toggling like I want it to. I have made a command to test to see that the variables were working, so that isnt the problem. Just dont understand why it only runs one part of the skript.
Troubleshooting:
Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? I added the else part to see if the variables were the problem (they arent)