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

Kill Giver Script Working Once, Then Breaking Right After. Does anyone have a solution?

I have a server script in serverscriptservice that gives deaths and kills once, then never does it again in the server. Im really confused on this and it's giving me trouble alot. Please ask for clarification on anything, I'd be happy to assist. this isnt the full script it's just the broken portion, but I can provide it if necessary

character.Humanoid.Died:Connect(function()
		deaths.Value = deaths.Value + 1
   local tag = character.Humanoid:FindFirstChild("creator")
  if tag then
    local plr = tag.Value
    if plr~= nil then
        local plrStats= plr:FindFirstChild("leaderstats")

        if plrStats ~= nil then
            local kills = plrStats:FindFirstChild("kills")

            kills.Value = kills.Value + 1
        end
   end
end
end)

1 comment

0

There are no errors running in the output^^

1 answer

Ok so, i think i know what it is, you need to put it in a while true do loop i think, try that then tell me if it worked.

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