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

Tracking Kills on an NPC (Need help because I'm clueless)?

Asked by
VoltCode 101
7 years ago

I know this is possible, because some RPG's use it.

How do I achieve this? I'm not sure.

Sorry if this doesn't contain any code, I'm just clueless on how to do this (My objective is to kill NPC's with a sword,And increase a value)

Thanks in advance to everyone who helps :)

0
Data stores/ leaderboard/ savestring farrizbb 465 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

Have the "sword" (weapon) you're using use an .Touched function to then determine the parent of the object it hit (only on swing). Use this to determine the Humanoid's health to then decide whether or not to add a kill to the stat.

(Sorry for the brief description)

Ad

Answer this question