Using 5.4.1 and building the Space Shooter tutorial- Modify Prefab Properties

I wanted to adjust the z position of the engine_player when the forward arrow is clicked. My question is how do I access that property of the engine_player prefab attached to the player space ship? Here is the code thus far:

using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour
{
private Rigidbody rb;

public float tilt;
public float speed;
public float flameLength;

void Start()
{
rb = GetComponent();
}
void FixedUpdate()
{
float moveHorizontal = Input.GetAxis(“Horizontal”);
float moveVertical = Input.GetAxis(“Vertical”);
// flameLength = some value between .25 and .75 based on up arrow being pushed
// assign it to the prefab z transform position property
Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);
rb.AddForce(movement * speed);
}
}

Vector3 position = transform.localPosition;

position.z = flameLength;

transform.localPosition = position;

You can swap out localPosition for position if you need it in world space.

Also just a tip:

Unity doesn’t document this very well, but you don’t have to make your variables public to be able to use them in the editor.

[SerializeField]
private Rigidbody rb;

[SerializeField]
private float tilt;
[SerializeField]
private float speed;
[SerializeField]
private float flameLength;

That way you can drag in your rigidbody using the inspector and you can get rid of the unnecessary getComponent that you have in the Start() and keep your variables private but still be able to tweak them in the inspector also