I was making a script the last few minutes and was already running into a problem with testing in what world the player is inscript:
variables:
{%player%.random} = true
every 1 seconds:
loop all players:
if {%loop-player%.random} = true:
if player is in world "randomItemFlat":
give loop-player a random element of all items
wait 1 tick
command /togglerandomitems:
trigger:
if {%player%.random} = true:
set {%player%.random} to false
message "&8You have &cdisabled &8random items" to player
else:
set {%player%.random} to true
message "&8You have &aenabled &8random items" to player
it keeps giving me the error:
There is no player in a periodical event line 6
( if player is in world "randomItemFlat": )
[doublepost=1669653096,1669652805][/doublepost]Here is a better way of reading the code
[doublepost=1669653586][/doublepost]NVM I FOUND A FIX I had to do loop-player in line 6 and not just player