Ai system bug (ai keeps getting stuck on the side of stairs)

Hello, me and my scripter have been working on a game for a while and we are having problems with the AI. Mainly the Ai going upstairs. For some reason the Ai doesn’t go upstairs but instead keeps getting stuck on the side of the stairs and can’t find a way to get around it. Any help would be very much appreciated!

Here are some images:

image

I believe you can use collision groups to make pathfinding avoid certain areas.

my scripter said that it would just make the npc go through the stairs.

Oh I mean Making a collision part next to the stairs then adding it to a collision group that the npc can’t walk through. I think that would force it to go around but I could be wrong.

1 Like

Use Pathingfinding Modifiers or Links to resolve this.
Character Pathfinding | Roblox Creator Documentation

Also check that your path parameters are correctly set up for the character’s size (AgentRadius, AgentHeight = 6)

the lower radius goes on the edges which eventually climbs the stairs.

Have you tried visualizing the path and then changing settings to see what impact it has?

for i,wp:PathWaypoint in pairs(waypoints) do
	local p = Instance.new("Part",workspace)
	p.Anchored = false,
	p.CanCollide = false
	p.Size = Vector3.new(1,1,1)/2
	p.Position = wp.Position

	local pm = Instance.new("PathfindingModifer",p)
	pm.Label = "Waypoint"
	pm.PassThrough = true -- make sure the part doesn't block any new pathfinding computes

	game.Debris.AddItem(p,5 + i/5) -- destroy the part after 5+ seconds
end