How do I make this "step" appear when Triggered by Player ?

Here is one code I came up with and tried (not Working) No Errors, just can’t see WHERE to assign the Location and Rotation values in the Inspector…

using UnityEngine;
using System.Collections;

public class Invisibility : MonoBehaviour {
	public Rigidbody SteppingStone9;
	
   	void OnTriggerEnter(Collider col){
	 if (col.gameObject.tag == "Player"){
		Rigidbody Step = Instantiate(SteppingStone9, transform.position, transform.rotation) as Rigidbody;
	}	
		
}
}

ALSO TRIED same code BUT use isVisible = True
instead of the Instantiate system

I desire to stay in C# for this code.

What’s the idea? Instantiate an object in front of the player when he enters the trigger? If so, you should use col.transform.position as the base position, and possibly add an offset in order to find the target position - kind of:

using UnityEngine;
using System.Collections;
 
public class Invisibility : MonoBehaviour {
    public Rigidbody SteppingStone9;
    // offset relative to player position:
    public Vector3 offset = new Vector3(0, -1, 1);
 
    void OnTriggerEnter(Collider col){
        if (col.gameObject.tag == "Player"){
            // calculate player position plus offset:
            Vector3 pos = col.transform.TransformPoint(offset);
            Rigidbody Step = Instantiate(SteppingStone9, pos, transform.rotation) as Rigidbody;
        }  
    }
}

If you want to use the same rotation as the player, replace transform.rotation with col.transform.rotation.

Ok, I looked at the SetActive explanation in the Scripting Reference and here is what it said…

GameObject.SetActive

void SetActive(bool value);

Description

Activates/Deactivates the GameObject.

Note that a GameObject may be inactive because a parent is not active.
In that case, calling SetActive() will not activate it, but only set the local state
of the GameObject, which can be checked using GameObject.activeSelf.
This state will then be used once all parents are active.

See Also: GameObject.activeSelf, GameObject.activeInHierarchy.

using UnityEngine;
using System.Collections;

public class Example : MonoBehaviour {
    void Example() {
        gameObject.SetActive(false);
    }
}

But I still see my steps. All of them; even though I assigned this script ( from you ) to the Empty Object, which is the trigger and the Step is the child.

So, after looking at the script, I see the SetActive is TRUE in your script, but I need it to be False before going True.

I rewrote the script to this…

using UnityEngine;
using System.Collections;

public class StepInvisibility : MonoBehaviour {
	void Start(){
		Transform step = transform.Find("Step");
			step.gameObject.SetActive(false);
	}
   	void OnTriggerEnter(Collider col){
	 if (col.gameObject.tag == "Player"){
		Transform step = transform.Find("Step");
			step.gameObject.SetActive(true);

       }
    }
}

IT WORKS GREAT !!!
OORAH
here are the pics

GAME START
18801-stepsinvisible.jpg

Triggered the STEPS
18802-stepsappeared.jpg