maybe you get null reference because you disable this object then try to call then next function but the object is disabled so u get null. try calling display total coins and after it disable the object.
It’s telling you what’s wrong -
“NullReferenceException: Object reference not set to an instance of an object”. This doesn’t mean your thing is inactive; it means you’ve never set it, or you’ve destroyed it. You’ll need to make a public variable and assign it via the inspector, or use some code to find the particular object you’re looking for.
If you do it via code, GameObject.Find() can get you the object, and calling get component on the result can get you your particular script.
If you’re already trying to do this, note that GameObject.Find() only finds active objects - so you’ll need to call it after turning the object on.