A bot acting weird, falling into ground

Hello!

I am making a small game that is puzzle-a-like and there’s a bot using a pathfinding algorithm to find the shortest path.
I am having problem with basic bot behavior. It’s getting bugged when it gets created(Cloned from ServerStorage and moved to Workspace)
The problem is, it just, acts pretty weird. Falls down into ground and moving at random directions.
Here’s the code that is doing the work:

local Bot = Dummy:Clone()
DummyVal.Value = Bot
Botty = Bot
Bot.Name = BotNames[math.random(#BotNames)]
Bot.Parent = game.Workspace
Bot.HumanoidRootPart.CFrame = CFrame.new(55, 14, 50) * CFrame.Angles(0, math.pi, 0)

I am aware that my positioning is wrong, I should use a target part, use it’s CFrame etc. But this code is temporary. How can I fix this problem first?

1 Like

Sounds like a problem with your path finding algorithm. Mind sharing that code so I can take a look for you?

There’s no video of the problem or explicit details about what issue you’re having, so it’s not that easy for us to help you with this problem. That being said, someone did come to me on Discord with a similar problem so I think it’s applicable here.

Try forcing your Humanoid to use an initial idle state. When you change to this immediately, it should get rid of the state that determines when the Humanoid should wobble and act as though it’s standing still. From there, movement can take over.

Bot.Humanoid:ChangeState(Enum.HumanoidStateType.RunningNoPhysics)

Sorry for late answering :frowning:
I don’t think it does, pathfinding does not interfere with bot at all, and especially not at the game start. It’s just a value returning module script.
Thanks for your answer :slight_smile:

Sorry for late answering :frowning:
Sorry for the lack of details either, I couldn’t gather video or photo at that time.
Thanks for your answer, I’ll try it, will tell ya if it works :slightly_smiling_face: