using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class lavaDeath : MonoBehaviour
{
public GameObject player;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
private void OnTriggerEnter(Collider other)
{
if (other.gameObject.name == "Quad" || other.gameObject.tag == "Player")
{
Debug.Log("true");
player.transform.position = new Vector3(14f, 1f, -25f);
}
}
}
a simple script but my character doesn’t get teleported every time, only like 20% of the time. no, it’s not a child, it’s a parent. i have no idea what’s going on, any ideas? and yes, I am getting input in the console from the debug.log command.