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

Why does this script not give Rep when a player kills someone?

player.CharacterAdded:Connect(function(character)
	character:WaitForChild("Humanoid").Died:Connect(function()
		local tag = character.Humanoid:FindFirstChild("creator")
		if tag ~= nil then
			local player = tag.Value
			local bounty = 20
			
			local leaderstats = play:WaitForChild("leaderstats")
			leaderstats.Reputation.Value = leaderstats.Reputation.Value + bounty
		end
	end)
end)

2 comments

0

On line 8, I think you meany "player" but you put "play"

0

I'm having the same problem with Int Variables.

1 answer

player.CharacterAdded:Connect(function(character)
    character:WaitForChild("Humanoid").Died:Connect(function()
        local tag = character.Humanoid:FindFirstChild("creator")
        if tag ~= nil then
            local player = tag.Value
            local bounty = 20

            local leaderstats = player:WaitForChild("leaderstats")
            leaderstats.Reputation.Value = leaderstats.Reputation.Value + bounty
        end
    end)
end)

1 comment

0

I just made "play" on line eight to "player"

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