Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make an Npc have random movement and attacking nearest player?

Asked by 4 years ago

You see i am making a Demon slayer game so I need demons to move around randomly and to follow the nearest player and attempt to kill them so I have like a low to medium skill in roblox studio but I can not figure this out. Other websites point out how to make them move between points but players may avoid and sneak up to demons by the path so I need them to move around randomly. Please help me?

1 answer

Log in to vote
1
Answered by
sheepposu 561 Moderation Voter
4 years ago

You should use the PathFinding service for it to find the player. Then using Animation Controller, you can have the NPC use a punch animation. Have a script use touch service to see if the punch connects to the player. If the punch hits, have the player take damage. Hope this helps

Ad

Answer this question