Check if humanoid has an avatar when adding default avatar possession
This commit is contained in:
parent
24a0f22ce1
commit
6166df3e80
@ -132,14 +132,17 @@ namespace Passer {
|
||||
Debug.Log("Cleared Possessions");
|
||||
possessions = new List<Possession>(); // new Possessions();
|
||||
}
|
||||
|
||||
if (humanoid.avatarRig != null) {
|
||||
Possessable possessableAvatar = humanoid.avatarRig.GetComponent<Possessable>();
|
||||
if (possessableAvatar != null)
|
||||
AddPossessions(new Possessable[] { possessableAvatar }, true);
|
||||
}
|
||||
}
|
||||
|
||||
// Default Possessions cannot be deleted
|
||||
AddPossessions(defaultPossessions, false);
|
||||
|
||||
Possessable possessableAvatar = humanoid.avatarRig.GetComponent<Possessable>();
|
||||
if (possessableAvatar != null)
|
||||
AddPossessions(new Possessable[] { possessableAvatar }, true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
Loading…
x
Reference in New Issue
Block a user