Kills Value not adding in Kills Leaderstats

Do you have a script where you parent an ObjectValue of ‘creator’ ?

Can you show me where is the value called Creator ? Is it inside the Character or Humanoid?

this :
game.Players.PlayerAdded:Connect(function(plr)
local leaderstats = Instance.new(“Folder”, plr)
leaderstats.Name = “leaderstats”
leaderstats.Parent = plr

local Kills = Instance.new("IntValue", leaderstats)
Kills.Name = "Kills"
Kills.Value = 0
Kills.Parent = leaderstats

local Rank = Instance.new("StringValue", leaderstats)
Rank.Name = "Rank"
Rank.Value = "Silver1"
Rank.Parent = leaderstats

end)

and this:
local hum = script.Parent.Humanoid

hum.Died:Connect(function()
print(“Died”)
local tag = hum:FindFirstChild(“creator”)
if tag then
print(“Tag is not nil”)
local player = tag.Value
local kills = player.leaderstats.Kills
kills.Value = kills.Value + 1
end
end)

So you do not have a value named “creator” inside the Humanoid , well in that case you have to create a ObjectValue naming “creator” and once the player shoots the Humanoid set its value as the player.

1 Like

You should put your code inside a localscript inside StarterCharacterScripts. Use a remote event that fires the server and adds the value to the leaderstats in a server script.

1 Like

like this
game.Players.PlayerAdded:Connect(function(plr)
local leaderstats = Instance.new(“Folder”, plr)
leaderstats.Name = “leaderstats”
leaderstats.Parent = plr

local Creator = Instance.new("ObjectValue")
Creator.Name = Creator

local Kills = Instance.new("IntValue", leaderstats)
Kills.Name = "Kills"
Kills.Value = 0
Kills.Parent = leaderstats

local Rank = Instance.new("StringValue", leaderstats)
Rank.Name = "Rank"
Rank.Value = "Silver1"
Rank.Parent = leaderstats

end)
??

It has to be parented to each dummy , you can do it manually or by script.

EDIT : Creator.Name = Creator ← Wrong you have to assign a string not the ObjectValue itself.

Why not just put it in StarterCharacterScripts as a localscripts. Anyhow dummies dont have leaderstats so doing that won’t make sense

Why would you need to use local scripts and put this into StarterCharacterScripts , you can just loop through all the Dummies and parent the ObjectValue to it or if he has a base dummy he can just parent it to the base dummy.

i think my brain just commited suicide

best would be if someone do it for me lmao i dont understand 50% lol

Learn more basics , before trying stuffs . What you are trying at the moment is advanced to you according to your knowledge . Before doing something develop the idea on how to do it then script it , good luck!

1 Like

thanks ill do my best but on every video i look none of them did anything to kills value

You shouldn’t be relaying on videos , as I told develop your own ideas .

1 Like