If if((hit.transform != transform) means if hit.transform is Not transform, then how do I check if the statement Is correct. if(hit.transfor
if((hit.transform != transform)
if hit.transform is Not transform
if(hit.transfor
!=
==
So you'd write:
if (hit.transform == transform) {
What you wrote actually attempts so set the value of hit.transform to transform.
hit.transform
transform