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

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

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.

1 comment

0

You can definitely get a free model for this Just make sure it is not a virus and you should be fine

1 answer

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)

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