How would I be able to stop time and still move my character around?

I’m trying to make a little game and I’ve been really into the idea of Time Stop and being able to walk around while no one else can. I don’t know how to do it but I’ve been using Time.timeScale and manipulating it to try and move around. My code looks like this:

public class Player : MonoBehaviour {
    public string myName;
    public string myClass;
    public Text Level;
    
    void Start () {
        Debug.Log ("I am alive and my name is " + myName);
        Debug.Log("My Class is " + myClass);
    }
    
    void Update () {
	    if (Input.GetButtonDown("Fire3")) //Stop everything with this.
        {
            if (Time.timeScale == 1.0f)
                Time.timeScale = 0f;
            else
                Time.timeScale = 1.0f;
            Time.fixedDeltaTime = 0.02f * Time.timeScale;
        }
        if (Input.GetButtonDown("Fire2")) //Try to move during stopped time with this.
        {
            if (Time.timeScale == 0f)
                Time.timeScale = 1.0f;
            else
                Time.timeScale = 0f;
            Time.fixedDeltaTime = 1.0f * Time.timeScale; //Character can move and frozen objects lag around.
        }
	}
}

Any help?

Hi!
The idea of using timeScale is not very good, you can notice that all the game “pauses” so what you want to do have to be done in a different way.
You can have a reference to the updates of the world things (for example a ball moving around).
When the player triggers “Fire3”, you can enabled = false, that reference. (the reference should be of the script that in the update is moving the ball).

So by doing scriptBall.enabled = false, the update will not run any more until you do:
scriptBall.enabled = true.

Be carefull that rigid body and colliders and stuff will continue working, if you want to set off the collider, you will have to have another reference of that colliders of that game object.

hope it helps, cheers!