private void OnTriggerEnter(Collider other) { if (other.gameObject.tag.Equals("Player")) { GameObject player = other.gameObject; player.GetComponent <Rigidbody>().useGravity = haveGravity; PlayerMoveController playerMoveControllerScript = player.GetComponent <PlayerMoveController>(); playerMoveControllerScript.MoveSetChange(canJump, canSlide, canMoveUD); } }