Before getting on to the main topic, I should point out that the defenders and attackers are both the same species, no humans are present in this scenario, as it does not take place on Earth. The race in question is a species of hexapodal, arboreal 'alien.' Comparable to the body plan of a chimpanzee if you were to super-glue an extra set of arms to it.
Because of their evolution in a heavily jungled area, they are extremely proficient in tree-tops (in fact, they're better climbers than they are walkers) and would likely face little trouble scaling a traditional Castle Wall by itself. This alone wouldn't be a large problem for defenders, as they could just drop heavy rocks or tar on top of any would-be attacker, however, their problem comes in the fact that they have six limbs. With (essentially) six 'arms,' an attacker could feasibly scale a defensive wall while protecting their entire body with medium to large shield, pretty much nullifying the previously mentioned gravity-propelled rocks, burning tar, or other on-wall defenses.
Of course, against a highly mobile adversary, the first and most logical defense would be to clear a large area around the kingdom, which forces them to cross an open field so that you could shoot at them from afar, but thinking about after that, what kind of wall, or other effective method could be used to slow down an advancing army? Is there any way to design a wall to stop these types of creatures from getting in, or would such a species skip straight over castle walls entirely?