how to make an object move around

i have a sphere that i want to move by using either wasd or the arrow keys (which ever would be easier) i have a script that will move it in one direction with the space bar, but i want to move it in all directions. the script is

function Update () 
         //do something
         transform.position.z += 0.1;

Here is a line that moves something using both WASD and arrow keys:

transform.Translate(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));

Also, you cannot modify the individual X,Y,Z components of a Vector3

just fort I am new to code what about useing first person control just delete camra and chage the wasd to the arrows just a fort

I can’t make this one line work,I can’t make this one line work…