I have been searching all over the internet but I can’t find to fix this in any way. This is my only hope right now.
Here is my code:
#pragma strict
var Distance;
var removeObject : GameObject;
var createObject : GameObject;
var pickupSound : AudioClip;
var pickupRange : float;
function Start () {
removeObject.SetActive(true);
createObject.SetActive(false);
}
function Update()
{
if (Distance < pickupRange)
{
pickup();
}
}
function pickup()
{
removeObject.SetActive(false);
createObject.SetActive(true);
}