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

Why doesn't this script for giving money each time a player kills a zombie work?

Asked by 3 years ago

I believe it's the > that is the problem.

if workspace["Zombie Spawn"].Model.Zombie.Humanoid.HealthDisplayDistance.value == >100 then
    game.Players.PlayerAdded:connect(function(p)
        local stats = Instance.new("IntValue", p)
        stats.Name = "leaderstats"
        local money = Instance.new("IntValue", stats)
        money.Name = "Cash"
        money.Value = 100
        while true do
            wait(5)
            money.Value = money.Value + 100
        end
    end)
end
0
you could do ["Zombie Spawn"].Model.Zombie.Humanoid.Died:Connect(function() and put the code here, also why is the money giving in a while true loop?? jedistuff2 89 — 3y

Answer this question