Roblox Tutorial: Armed Guard

My greatest talents go far beyond just discovering aggravating bugs, exploits, and problems with Roblox Engine.

I am creative and talented when it comes to working in Roblox Studio.

Based upon many hours of testing… I am confounded by how difficult it is to make a functional animated armed guard in Roblox that holds a gun tool in his hand like a real armed guard and then points it towards a target when the guard detects one.

I genuinely do not understand how to make one… and I’ve tried so many methods… the amount of baffling and weird discoveries I’ve made with welding is crazy… but that’s besides the point.

I am left empty handed.

I already have a pathfinding and raycasting system.

All I would need is the animation for a guard holding and pointing a gun.

I don’t just want some animation ID’s handed to me.

I want to see step by step how to do it because it is beyond baffling to me how anyone has ever created functional soldier AI’s within Roblox.

There are so many dead ends you can run into where your animation will crumble to pieces… and the welds can cause the character to easily become disfigured to where the only option is to revert to an older version of your place.

Help is desperately wanted with this… thank you!

3 Likes

Don’t worry about seeking help from the community. In any programming language, there is always a community that will help you with codes, and Roblox is no different.

But the main thing to note about helping with scripts is to try to build on something that has already been created. There are several ways to create an AI in an NPC, and everything will depend on the AI’s behavior.

To be able to do this, I recommend going back to the knowledge you have already learned, and in my opinion, the most important one is Programming Logic.

Create the step-by-step process that the AI ​​should do, such as checks, movements, speed, behavior (aggressive/passive/alarm), and you will succeed. As for animations, you can incorporate them as the code is being created, so there is no need to worry about that. The most important thing is that your AI works for what you want.

There are several examples of basic AI, which follows a player and causes damage, but if you want to go a little deeper into this, you will have to check what your game actually needs. I say this because NPC AI that attacks has several factors, such as a game that has movement and attack, only attack, parry, etc.

1 Like

I already succeeded with that. I will quote where I clearly stated this.

The code works… the animating and welding does not work.

Umm there definitely is a need to worry about that since that’s literally all of the issues I’m having with this

1 Like

I ended up finding my own solution to the animating problems that I was having so I’m just going to mark this as solved. If any kind and intelligent souls out there who saw this post and also have knowledge on how to do this… you should provide a useful tutorial out there for everyone. I would put one out there but I believe that there is a better way to do it than the way I do things. That is why I rather leave it in someone else’s hands to guide people on how to do this. Thank you!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.