Question by
anuragsVulcan · Jun 24, 2018 at 07:58 AM ·
unity 5transformparenting
Why is transform.parent not working in Unity 5.5.4?
Can anyone please tell me what's wrong in my code. I have spent last 3 hours searching for the issue. It seems like it works for everyone but me.
public class FollowYou : MonoBehaviour {
GameObject followThis;
void Start(){
followThis = (GameObject) GameObject.Find("activePlayer");
transform.parent = followThis.transform;
}
}
Comment