Making the player be sticked to the ground, help please!

Hello, guys! I need help: I’m making a Slenderman game. I made Slendy teleport to GameObjects around the player, but there are mountains on my terrain, so he spawns or too high above the terrain, or under it. Please help me with getting a script, to make him spawn exactly on the terrain and to remain there at all times! Don’t dissapoint Slendy, he’s a cutie!

Well here’s the answer to one of your questions.
If you want him to spawn above the terrain and not in it, then you will need physics of course. and then after you move him to the location you will need to add to the Y axis about 25 or so, depends on how much he is going in the ground.

The code will look something like this.

function Update(){
//Move slender to gameobject near player
//under certain circumstances move him above ground using gameobject.transform.position.Y += 25; depends on how high above ground he is.

sorry i’m not sure about the code for this because you didn’t give much to work with. :stuck_out_tongue: