how to transform position of player to parented object?

What I’m having problem on is that when my Player detects the “EdgeDetect” it will go in an edge hanging animation but sometimes my player doesn’t get the right position.

so I put an “EdgePos” as seen in the picture below. But I tried this code but gets error.

charPlayer.transform.position = transform.FindChild("EdgePos");

the other thing is that I can’t make a Transform variable where you can drag the “EdgePos” object to the Transform slot because I’ll be making multiple edges to hang from.

You’re trying to set a Vector as a Transform.

Try this:

charPlayer.transform.position = transform.FindChild(“EdgePos”).position;

FindChild gives you the transform of an object. You need to specify the position to get the Vector.