gameobject does not contain a definition for Parent
is the error I am receiving
Here is the code:
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
public class PlayerOnRope : MonoBehaviour
{
public GameObject Player;
public GameObject Bone1;
public GameObject Bone2;
public GameObject Bone3;
public GameObject Bone4;
public GameObject Bone5;
public GameObject Bone6;
public GameObject Bone7;
public GameObject Bone8;
public GameObject BoneEnd;
void OnCollisionEnter(Collision col)
{
if (col.transform.gameObject == Bone1 || Bone2|| Bone3|| Bone4|| Bone5|| Bone6|| Bone7|| Bone8|| BoneEnd) {
Bone1.Parent = gameObject;
Debug.Log("Rope Hit");
}
}
}