How would i make it so an ai can jump at its own accord?

Okay, so currently im making a neural network…
I want it to complete an obby but not using pathfinding and i just want it to move around and learn and use genetic algorithm, but this post isnt about that, well… kind of… How whould i make it so the ai can jump anytime it wants? For example, while completing the obby it needs to jump, after like i dunno 20 or more generations it will try jumping and moving at the same time (atleast its what i imagine it to do) the only problem is giving it the information of ‘Hey! You can jump, and here is how to.’ i want to tell the ai that it can try to move forward and jump, how whould i do that though?

Thanks!!

Humanoid.Jump = true makes any humanoid rig jump.

2 Likes

Or even Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)

1 Like

Yeah i know that but how whould i like make it so if the ai wants to jump it tells the script to make the character jump, is it possible to do that?

Well theres a pathfindingService tutorial which might help, it uses roblox’s AI system to calculate paths.

You can read about it here

There, it shows how you can find if a path is blocked, how to make an NPC move, jump, and go around obstacles

1 Like

But it would be perfect wouldn’t it?
If i did that the ai would always predict where the air block is and where to jump, what im trying to do is an ai that will try to learn from its mistakes but i also want it jumping over stuff…

Hm, well I’m not that experienced unfortunately. Theres a reason AI is hard to make (hence “Artificial Intelligence”), but I can’t help on that

1 Like

Oh alr thanks for the help either way!! :smiley:

No problem!

1 Like