using System.Collections; using System.Collections.Generic; using UnityEngine; public class GoHome : MonoBehaviour { public GameObject homeObj; public PlayerMovement mov; public void GoToHome() { mov.rb.position = homeObj.transform.position; } }