Are the grey parts inside the NPC models? Pathfinding ignores humanoids, so you could try attaching it as a separate part outside the NPC models. I suppose using a normal weld to keep them attached to the NPCs would work…
uh no, they’re parts inside the character model
don’t mind the naming i know what is what
Sweet, so basically, all you have to do is use PathFindingModifiers to fix it.
in pathParameters add cost of GreyPart to make sure npcs ignore it.
local modifier = Instance.new("PathfindingModifier")
modifier.ModifierId = "GreyPart"
modifier.Parent = greyPartInstance
local pathParameters = {
AgentRadius = 2,
AgentHeight = 2,
AgentCanJump = true,
AgentCanClimb = false,
Costs = {
GreyPart= 10
}
}
by manually making the cost of going through GreyPart, you can force the npcs to ignore it in the path
Name
or Path
?
Name doesn’t seem to make them go around it.
Oh yeah you would have to do something like this:
local modifier = Instance.new("PathfindingModifier")
modifier.ModifierId = "GreyPart"
modifier.Parent = greyPartInstance
and then do
GreyPart = 10
its supposed look for “ModifierId” lemme edit and fix the error above rq
shouldn’t it be .PassThrough = bool
instead of ModifierId?
ModifierId doesn’t seem to be a thing
Its been quite long since I’ve used pathfinding, they must’ve made changes to it? Yeah sure try .PassThrough = false
, weird, I used ModifierId like a month ago or something
yeah that seems to semi-do-the-trick
you can still stack them in one place by running in circles while they chase you
NPCs are one of most difficult things to make. Why u don’t make any simple game before?
If you’d want it to be more precise, you’d have to think out of the way and go for something like RayCasting
and then moving them out of the way if ray hits greyPart, this is a bit complicated to think about and implement though.
what is this even supposed to mean
they work like they should, i just want to make them avoid one part
sounds like a hassle to do, no thanks
when i doubt, find a simpler way out
(i will probably tamper with melee combat a bit)
So they work, but u don’t know how to set collision group?
yes i’ve never worked with collision groups before??
Really? Collisions group is so visible thing on the parts. Even name of it clearly tells some parts can collide some not.
visible thing on the parts…
it’s inside properties
And properties are visible window on the screen.
if you’re really that curious as to why i “didn’t make a simpler game”:
footage is nearly 2 weeks old, a lot has changed since
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.