I want to create an NPC at point A and make it move to point B, then disappear, but the scripts I'm using don't allow that
C#:
command /getnpc:
trigger:
set {_loc} to location at (263.5, -60, 84.5) in world "Server"
spawn a pig citizen named "PigNPC" at {_loc}
wait 5 seconds
set {_endloc} to location at (284, -60, 84) in world "Server"
set pathfind location of the npc named "PigNPC" to {_endloc} with speed 1