Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

need help with a error

$
0
0
hi im new to programing and i was messing around with a checkpoint system and this error NullReferenceException: Object reference not set to an instance of an object PlayerPos.Start () (at Assets/PlayerPos.cs:12) appears with the following code --------------------------------------------------------------------------------- using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerPos : MonoBehaviour { private Game_Master gm; private void Start() { gm = GameObject.FindGameObjectWithTag("GM").GetComponent(); transform.position = gm.LastCheckPoint; } } any idea why its showing up as its stopping my checkpoint system from working

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>