my starting solution; (didn't work)

if (me) is (blank) studs near teleport to (blank)