how do I fixate a position through script.

I know That Translate will make it move but it doesn’t keep it in one place. if I have an arrow that has its Y position linked to a float variable than what do I use to keep it in one place?

Here is the script

private Sense SenseScript;
public Transform player;
private Transform EnemyGuy;
private float height = 0;
void Start()
    SenseScript = player.GetComponent<Sense>();
    EnemyGuy = SenseScript.closestEnemy;

// Update is called once per frame
void Update () {
    height = EnemyGuy.position.y - transform.position.y;
    if (height <= 330){
void stabalize ()
    // I think It should Go here.


Just use a world space UI canvas and parent it to the enemy. It’ll move with respect to the enemy, no code required. You don’t have to do everything with code in Unity. You may want to look over the tutorials at Learn Game Development Without Coding Experience | Unity for exposure to cases and their possible solutions to get a feel on how to tackle your own problems.