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

How to make a leaderstats that count Kills of both Npc's and real players?

Asked by 8 years ago

I got a free model of leaderstats that has KO's and WO's but it does not count Npc kills. How do I make it do that

1 answer

Log in to vote
0
Answered by 8 years ago

Hello.Thanks for coming to scripting helpers!

One way to do this is to create an ObjectValue named 'Creator' inside the humanoid when hit with a weapon.In a script inside the humanoid,you would then add stats to the player that is inside the 'Creator' value inside the humanoid.

Another way to do this,which is more complex,would be to Connect to the death event of the currently targeted humanoid.When that humanoid dies,you would add to the stats from your weapon.You would need to disconnect the death event if/when you target a new humanoid.

Hope this helps!

Ad

Answer this question