3rd person problem

hey guys, i am making a 3rd person game, my character has to be able to rotate to look for objects, but when i added a keyboard sensor > and linker > motion z rotate

It basically kept walking straight and didnt take into consideration that i might be rotated. so it kept walking along the 0 axis even though i might be rotated to a -90 axis

How do i fix this?

Click the little [L] button on the side.