local Humanoid = script.Parent.Enemy
function PwntX_X()
local tag = Humanoid:findFirstChild("creator")
if tag ~= nil then
if tag.Value ~= nil then
local Leaderstats = tag.Value:findFirstChild("leaderstats")
if Leaderstats ~= nil then
Leaderstats.Kills.Value = Leaderstats.Kills.Value + 1
wait(10)
script:remove()
end
end
end
end
Humanoid.Died:connect(PwntX_X)
COMMUNITY QUESTION
Why leaderstats aren't working on online?
1 answer
On line 3 and 6 you've done it as 'findFirstChild'. You're supposed to do it as FindFirstChild.
local tag = Humanoid:FindFirstChild("creator") -- line 3 issue
local Leaderstats = tag.Value:FindFirstChild("leaderstats") -- line 6 issue
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
On line 6, there's no "findFirstChild" it should be "FindFirstChild"