Its an easy fix use this instead: using UnityEngine; public class Zipline : MonoBehaviour { private bool isGrabbing = false; public GameObject player; void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { player = other.gameObject; } } void OnTriggerStay(Collider other) { if (other.CompareTag("Player")) { if (Input.GetButton("Grip")) { isGrabbing = true; } } } void OnTriggerExit(Collider other) { if (other.CompareTag("Player")) { isGrabbing = false; player = null; } } void FixedUpdate() { if (isGrabbing && player != null) { // Move the player along the zipline player.transform.position += transform.forward * Time.deltaTime * 5f; } } }