i have a script which makes my enemy ragdoll when shot. `if (Physics.Raycast(fpsCam.transform.position, fpsCam.transform.forward, out hit, range))
{
RagdollController ragdoll = hit.transform.GetComponent();
if (ragdoll != null)
{
ragdoll.die();
}`
this works fine however due to this line of code ` setColliderState(false);` which turns off all of the colliders when i shoot the enemy it does nothing. i tried to fix this by using `boxcollider.enabled = true;` but since i have two box colliders which i need to be on, it only turned on the first one.
so i would like to know if there is a way to enable both of them or change one of their names.
please and thank you.
↧