I want to create an enemy in a 2d setting, the player should be able to walk past it, but the enemy should not fall through the floor, the floor has a floor tag and the enemy and player has their own tags to, I am fairly new to coding so I dont know how to do this exactly
You can ignore collisions like so
layer 0 (default) and layer 8 (custom layer you set in Inspector window)
Physics.IgnoreLayerCollision(0, 8);
another approach
Physics2D.IgnoreCollision(target.GetComponent<Collider2D>(), GetComponent<Collider2D>());