Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago

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)
0
There are no errors running in the output^^ alldentalcare 0 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

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.

Ad

Answer this question