using System.Collections; using System.Collections.Generic; using UnityEngine; public class Amboss : MonoBehaviour { private GameObject anvil; public bool one; public bool two; public bool three; public bool four; // Start is called before the first frame update void Start() { anvil = GameObject.Find("ambos"); } // Update is called once per frame void FixedUpdate() { if(one&&two&&three&&four) { anvil.GetComponent().constraints = RigidbodyConstraints2D.None; } } }