So I am making a skript that tracks a player when the compass is right clicked, and I am having trouble with the conditional in the skript.
Code (Text):
command /track <player>:
description: Use this command to track a player by right clicking with a compass
trigger:
set {target player} to arg 1
send "<yellow>You are tracking %{target player}%"
give compass to the player
on rightclick with a compass:
if player and {targetplayer} is in world "world":
set {track location} to location of {target player}
set player's compass target to {track location}
send "<light green>Compass is now pointing to %{target player}%"
else if player is in world "world":
send "<light red>%{target player}%<light red> is not in the Overworld"
else:
send "<light red>The compass does not work in this dimension"
When I test the skirpt on my server, the game says *player name* is not in the Overworld, so clearly the first conditional is not including all the scenarios I want it to. When the compass is used in the other dimensions, the correct text appears, therefore (if I'm correct) the problem is line 9:"if player and {targetplayer} is in world "world"(this line is meant to check if both the tracked player and the player with the compass are in the overworld)Any suggestions on what to change?