How to create holes in endless runner/ spawning objects further away?

I’m making an endless runner. And I already have a few obstacles. I want to make some holes in the floor. So that the player would die when he falls. But the problem is that the player doesn’t really move forward. Only the obstacles move. So the floor doesn’t move either. Because then the player gets pushed backwards. I really have no clue how to fix this. I though about checking the z position in place. Which wouldn’t allow the floor to move the player. But then the obstacles wouldn’t move the player either. I even thought about turning off gravity and placing the player slightly above the ground but then the player wouldn’t be able to fall. Is there a solution or do I need to start again but just move the player instead of the obstacles?

… First time making a game.

edit: Okay so I made a copy of the folder. Now my player moves instead of the obstacles. But a different problem has made itself known… How can you spawn objects always at a different position. Like now it keeps spawning at the same spot. But to make it endless, the obstacles need to spawn every time a little bit further away. Maybe this has to be in a different question. I really don’t know.
But this is what I have atm.

public GameObject[] Prefabs;

	public GameObject Prefab1;
	public GameObject Prefab2;
	public GameObject Prefab3;
	public GameObject Prefab4;
	public GameObject Prefab5;
	public GameObject Prefab6;
	public GameObject Prefab7;
	public GameObject Prefab8;
	public GameObject Prefab9;
	public GameObject Prefab10;

	public float spawnMin = 2f;
	public float spawnMax = 3f;

	void Start ()
		CreateObstacle ();


	void CreateObstacle()
		Invoke ("CreateObstacle", spawnMax);
		int pickNr = UnityEngine.Random.Range(1, 6);
		if (pickNr == 1) 


		if (pickNr == 2) 


		if (pickNr == 3) 


		if (pickNr == 4) 


		if (pickNr == 5) 

		if (pickNr == 6) 


If you are making an endless runner, keeping the player in place and moving the world around him is the way to go, so you should change that back. As to how to spawn objects on different places… Have you checked the docs? Instantiate takes 3 argumants: the prefab object you want to instantiate, the location where you want it to instantiate, and the rotation you want it to instantiate with.

If you want a gap, just spawn a new floor part such that it doesn’t connect with the previous one.