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

How do i mark coins and kill on leadersttats? Read body please

Asked by
Prekzz 0
2 years ago

I want to give the player 10 coins per kill, and add it to the coins leaderboard, as leaderstats. Also, I want to know how many kills the player has, and how to input that information inside the leaderstats.

0
You can definitely get a free model for this Just make sure it is not a virus and you should be fine inverseearth 15 — 2y

1 answer

Log in to vote
0
Answered by
Ziffixture 6913 Moderation Voter Community Moderator
2 years ago
Edited 2 years ago

Insert an ObjectValue into the killable entities. This instance will serve as a "last attacker" record as each time a player attacks a killable entity, they will write their Player instance to ObjectValue.Value. When the entity dies, it will read from the "last attacker" record and perform the necessary actions.

(Ensure attacks cannot follow through if the entity is already dead)

Ad

Answer this question