3rd person game player movement

Hello i am newbie to unity, i am developing a simple character movement script in a game i have setup as third person (In short, my camera is following my character from behind).

i have setup my horizontal inputs to rotate my player on y-axis (using rigidbody.moveRotation() method).

but even if my player rotates around y axis which doesnt affect my z-axis…i want to use Transform.forward method to move my character ahead in the direction which i am facing but it doesnt do that way…it only moves on the conventional z-axis…

when in the scene mode i can see my player’s local z-axis changes its direction when i rotate my player but it doesnt move in that direction when i hit vertical inputs

please help me solve…and point out any fundamentals if i am missing

thank you

You can use transform.forward/up/right (these are the 3 axes) , that is your object’s local orientation. Take a look here.