Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would i go about making NPCs use Tools?

Hello, i am making a game and i am wanting to make an NPC use tools for combat I have seen this done before especially in games such as 'Summoner Tycoon' and this really fascinated me because i am super interested in AI.

I'm guessing i will have to use an Event which is triggered when the npc is close enough to something?

I don't want the code i just want to know how to go about this situation. Thankyou

2 comments

0

Not a request site!

0

It's fine.

1 answer

✓ Accepted answer

Okay so.. 1. This isnt really for this site but i still can help you!

  1. Make it so the magnitude of the HRP of the NPC and of the Player are near each other it walks to the person.
  2. Make it so they hold a tool ._.
  3. Make it so they use a animation (with the tool) when theyre like.. standing against the person (Make a check for this with Magnitude again)

3 comments

0
  1. Make it so the magnitude of the HRP of the NPC and of the Player are near eachother, and then make it walk to the person* sorry my bad
0

Might want to be specific about the meaning of 'HRP'. I know it means HumanoidRootPart, but it can have different meanings for different people. Some may not even know its meaning.

0

Yeah that was what i was thinking. Thankyou

This discussion is preserved as it was. New answers, comments, and votes are closed.