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

Identifying player who scored a kill to change IntValue insdie them?

I've seen scripts that award KOs and WOs by using the 'creator' object, but what if I want to change a certain IntValue I've placed inside each player each time a player scores a kill? What would I need to do to the script then?

My biggest issue talking this problem is I'm clueless on how to connect the death of a player to who caused it. Would that be used with the creator object?

I tried using this:

local Humanoid = script.Parent.Humanoid function killed() print("running points") local tag = Humanoid:findFirstChild("creator") local elo = tag.ELO elo.Value = elo.Value + 15 wait(0.1) script:remove() end Humanoid.Died:connect(killed)

...but to no avail.

1 answer

✓ Accepted answer

I'm not home at the moment, but if I remember correctly, the creator tag is either in the Player's character or Humanoid once they die, with the name of the killer. To confirm my information, you can check the standard leaderboard scripted created by ROBLOX.

Once you've located that tag, you can read the creator each time someone dies, which would be the player, then add +1 or so to the IntValue inside the player.

Note: If you're using FIlteringENabled, this will be a bit more tricky.

Hope I helped! If you have any questions, comments, or concerns, Comment! +1 me!

2 comments

0

Ah, that explains the location then. Also, when I go to look at the LinkedLeaderboard I get an error saying "Unable to load script. If the script uses LinkedSource, the LinkedSource may have been renamed or removed." What's up with that?

0

Hm, well Im not very fond of LinkedSource. What are you attempting to do? @Phantom1996

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