Help Getting Custom Humanoids to Go Up Slopes & Stairs

So I made some extremely basic custom character handling for NPCs for a game I’m working on. It just allows them to have a dead, active, inactive, and physics state. Everything works well but if there’s a part that’s slightly above the bottom of the root it’s hard for it to overcome the obstacle. It’ll get stuck on small edges since I haven’t scripted the ability to go up stairs / elevated parts that aren’t a smooth slope. It will still go up slopes but at a much slower rate than the walkspeed due to gravity.

Was wondering if anyone has any ideas on how I could make elevation changes smoother and more consistent so that the NPCs don’t get stuck. I’m really not sure how to approach this as my goal for this npc system is to be very performant where I can have 100+ concurrent NPCs with 0 lag.