I don’t know if it was because of how I set the scene up originally or if it is because I moved something when learning.
In the end I decided to do this part again and that was where the error was.
I went to file:- New scene and laid the floor cube down again.
I created the empty placeholder and called it Player.
After attaching the main camera to it as a child, I removed the camera script from the main camera and reapplied it to the Player parent.
I tested it and it worked.
Breakdown of problem and solution:-
Problem / Error
The tilt was happening when I was moving the mouse forward and back, and the code was fine.
Create a new scene and save it over the old main scene file.
The scripts ect are still there.