// Update is called once per frame void Update() { if (moveDel.isGrounded()) { dead = true; gameObject.layer = LayerMask.NameToLayer("Ground"); } }