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

why does my scripts do not communicate? (or im just dumb)

Asked by 2 years ago
Edited 2 years ago

so check this, i think i did code right but it's not working so can ya help?

function handleKillCount(humanoid, player)
    local killer = getKillerOfHumanoidIfStillInGame(humanoid)
    if killer ~= nil then
        local stats = killer:findFirstChild("leaderstats")
        if stats ~= nil then
            local kills = stats:findFirstChild("Kills")
            local spree = stats:findFirstChild("Kill Streak")
            if killer ~= player then
                kills.Value = kills.Value + 1
                spree.Value = spree.Value + 1
            else
                kills.Value = kills.Value - 1

            end
        end
    end
end

this is the part of free model that does work

local phase0 = true
local phase1 = false
if game.Workspace.MainLeaderstats.spree.Value < 1 then phase0 = false and phase1 == true
if phase1 == true then game.StarterPack.Hammer.Handle.phase1par.Enabled = true end end

this is da code by me in the serverscriptservice

and "phase1par" (particle) is in da hammer (tool in starterpack) thanks

0
"it's not working" doesn't explain what's not working. Miniller 562 — 2y
0
Where is the code for getKillerOfHumanoidIfStillInGame??? User#47934 5 — 2y

Answer this question