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

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

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 :)

1 comment

0

Data stores/ leaderboard/ savestring

1 answer

✓ Accepted answer

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)

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