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

Why leaderstats aren't working on online?

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) 

1 comment

0

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

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.