How to make AI that works with roblox

how do you make ai that can respond back to questions

Hey, Hopes so you will be great,
What I’m suggesting here isn’t perfect by all means, but here’s a few ideas that might help you out. This is assuming that you will create the AI from scratch, aside from using Roblox’s built-in pathfinding service.

Since you seem to be worried about players taking advantage of weaknesses in the AI, you could design your AI to be unpredictable, by giving it a small handful of possible moves it can make against the player. Even if the player knew all the possible moves of the bot, if you made it so that the bot randomly selects moves it would be much more difficult for the player to take advantage of it.

I’m not sure what combat abilities that the player and bot has in your case, but you may need to design your AI differently depending on it. For example, if the player and bot uses swords, you could have your bot only make a move when the player moves within a certain vicinity of it. And from this you could have a variety of possible moves for your AI when this occurs. Your bot could circle around the player then approach, or have it jump over the player first and then attack. It will have a chance and no absolute guarantee of performing these moves so that it is always unpredictable for the player.

If your player and bot uses guns, you could program your bot to hide behind cover, strafe around the player, or even jump around continuously to avoid getting hit. In all these cases, the bot will always keep track of the player’s exact position as well as minding the map that it’s in.

Finally, regarding the map. If the map the player and bot are battling on has obstacles, you will have to incorporate pathfinding into the bot. In this case, you could have your bot find it’s way to the player, and when they are within line of sight your bot could change it’s behavior so that they could battle the player. If your player and bot are battling on a flat arena, you don’t have to use pathfinding but you might have to account for the borders of the arena so that the bot doesn’t get stuck or cornered.

The AI I’m suggesting here will not handle every possible situation out there, But I hope this helps regardless.