How do I make this player controller work properly

The idea for this script is that when the player interacts with a door his controls will be paused and he will be teleported to the other side and he will be able to move once again.
I am using coroutine so that he also isn’t able to spam the door teleport which works but the player controller still moves.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using SUPERCharacter;




public class Door : MonoBehaviour, IInteractable
{

  public SUPERCharacterAIO playerScript;
  public AudioSource[] BUZZ;

public Transform player, destination;
public GameObject playerg;
private bool isInteracting;
public bool Interact()
{


    if (isInteracting) return false;
    if (playerScript.enableMovementControl) return false;
    isInteracting = true;
    playerScript.enableMovementControl = true;
    StartCoroutine(enterRoom(1));
    return true;

}




    private IEnumerator enterRoom(float delay)
    {

    yield return new WaitForSeconds(delay);
    playerg.SetActive(false);
    player.position = destination.position;
    playerg.SetActive(true);
     isInteracting = false;
    playerScript.enableMovementControl = false;
    }


}

As you can see I am trying to call the bool from the player script which is the main problem for me.
How do I fix this so that it works?

Perhaps use the same isInteracting boolean by your player?

This would require the player to track which door they are possibly manipulating for the duration of the manipulation.

A more robust way is to have the interacting interface able to return a boolean that might indicate, “yeah, I’m still being interacted, so don’t let the player move yet”