How can I make a humanoid spawn behind a wall that you look at?

I am wanting to make it so every 30 seconds whatever wall the player looks at a humanoid gets :MoveTo() behind that certain wall but idk if that is possible but I know how to use raycast to say the least