Rigidbody.addforce after scene reload

I have a character with a rigidbody, when I swipe the screen to the left the character moves on the X axis from 0 to -1.2 and when swiping to the right it goes from 0 to 1.2. I am doing this with rigidbody.addforce

Vector3 move = new Vector3(Myplayer.transform.position.x - 605, 0, 0);
                rigidbody.AddForce(move * 5);

This works exactly like how I need it to, problem is when the player dies and I reload the scene with scenemanager.loadscene and try to swipe it now seems to be adding more force than it should. it would go from 0 to more like -2 or 2 instead of -1.2 and 1.2.

Earlier I was getting errors where after the scene was reloaded the log says it can not find the rigidbody anymore, I fixed that by having it look for the character again and find the rigidbody at the start.

Not sure why scenemanger is causing these issue, never had these problems with other projects I have worked on. Not sure if anyone would know of a fix or a better way to move the player without going through objects. Thanks in advance

@yousifmessi, When you load a scene, every object that is not created through the editor is destroyed. Everything is returned to the Scene’s original state as it was before you pressed the Run button - before any code executes.

So it depends what your code does to objects after you hit the run button - any changes you make, objects you instantiate, anything that your code does, you have to redo. When you reload a scene, you have to do everything exactly the same way and in the same order, or you won’t get back to your “Start”

This is a clue to your problem:

Earlier I was getting errors where after the scene was reloaded the log says it can not find the rigidbody anymore, I fixed that by having it look for the character again and find the rigidbody at the start.

I’m not sure what you mean by, “having it look for the character again and find the rigidbody” - When your game runs the first time, how is the character “found” and what do you do to it with respect to it’s Rigidbody component?

This issue of the character getting more force after you reload the scene is likely due to some property the of Rigidbody component of your character, such as Drag, is not set the same way the second time around - i.e. when you reload the Scene.