Help to solve this teleport code

  1. Create a boolean right after the first line of your playerMovement script:
    var playerIsTeleporting = false;
  1. Create an if statement right after the first line of the update function of the playerMovement script:
    if (playerIsTeleporting) {
  1. Set the boolean to true right before teleporting:
    playerIsTeleporting = true;
  1. Set it back to false right after teleporting:
    playerIsTeleporting = false;
1 Like

so i set the boolean in this script?

else if (entity.other.tags.has("player")) {
        var test ="test").getPosition();
        var player ="Player").script.playerMovement;
        playerIsTeleporting = true;

Yes, that is step 3.