Player Stats [ASK]

Hey guys, if I use the regular leaderstats script that we can find either on YouTube or in Toolbox for Kill and Death, does it work with ACS guns too? because I only want to detect kills or deaths if a player gets killed or kills someone using the ACS gun. Thank you!

leaderstats can show all that. With a few scripts. You may want to take the time to create your own as it isn’t all that hard. Just do a few searches and you’ll be able to learn everything. leaderstats don’t update themselfs. You’ll need to script that out.

1 Like

I know how to make it, but how do I make it so that if, say, we’re resetting a character or getting killed by a non-ACS thing, it won’t add the stats

If you want a stat to only change/update if killed under certain circumstances, then you have to change/update the stat, exactly where the player got affected.

For a weapon for example, insert a line that tells the server to increase the kills stat by 1, right below the line where you tell the weapon to kill them. (You can also make an if-statement, where before they take damage, check if they’re alive before proceeding. Then if they’re dead after taking damage, give them +1 in kills)

if TargetHumanoid.Health > 0 then
	TargetHumanoid:TakeDamage(WeaponDamage)
	if TargetHumanoid.Health == 0 then
		DamagePlayer.KillStat += 1
		TargetPlayer.DeathStat += 1
	end
end
1 Like