I am trying to transform the position of an object. I have totally 3 Objects and 2 triggers, objects are 1. Left_Wall, 2. Right_Wall, 3. Obstacles. 1st trigger for transform the position of an objects y = -50, 2nd trigger for transform the position of an objects y = -7. Left wall and Right Wall are placed inside the environment. the environment will instantiate automatically for looping. if the player crossed the first environment previous environment will delete automatically. at that time in second clone environment if the player triggered means it will display a message as
MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object.
In first Clone environment its working perfectly. second clone environment its not working.