#npc moving in a straight line
1 messages · Page 1 of 1 (latest)
Can you paste the script responsible for pathfinding
local function NPCMove(NPC)
for i = 1,#workspace.CheckPoints:GetChildren(),1 do
local CheckPointNumber = 1
NPC.Humanoid:MoveTo(workspace.CheckPoints["CheckPoint"..CheckPointNumber].Position)
local AT = NPC.Humanoid
NPC.Humanoid.MoveToFinished:Connect(function()
CheckPointNumber += 1
if CheckPointNumber == #workspace.CheckPoints:GetChildren() then
NPC:Destroy()
else
NPC.Humanoid:MoveTo(workspace.CheckPoints["CheckPoint"..CheckPointNumber].Position)
end
end)
end
end
this is the code
looks fine
def a problem with the models ur right
the checkpoints r just invisible parts right
right
is everything welded to humanoid root part?
did you make the model
yes
** You are now Level 1! **
add weld constraints to the humanoid root part
each weld has 2 attachments
for each of the parts that isnt the root part, set one of the attachments to that part, and the other to the hrp
see if that allows it to move normally
either that or import a humanoid rig, make everything invisible, weld the slime the invisible rig, and animate that
if that doesnt work ping me
@fallow scaffold it worked but now they are floating and looking backwards
if they are floating ur hipheight value is too high
i think you can edit it in humanoid properties
but im not opening studio to check
and the looking backwards thing can be fixed by clicking on the humanoid root part and changing its rotation 180 degrees ig
sounds scary ngl
fixed the floating, and i couldn't find the looking backwards in humanoid properites then i realized wait i made the model, i can just move the eyes to the other side and that fixed that problem
That works too ig