Cursor.lockState = CursorLockMode.Locked;
Put that in the start method of your player script
already fixed it lo