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

Why won't my script do anything? it's supposed to change cash when you have InJob leaderstats to 1.

Asked by
Troevan -8
2 years ago
Edited 2 years ago
script.Parent.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
        local player = game.Players:GetPlayerFromCharacter(hit.Parent)
        if player.leaderstats.InJob.Value == 1 then
                print("work")
                player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 25
                wait()
                player.leaderstats.InJob.Value = 0
        end
    end
end)

it's a server script.

0
is there an error, whats the problem exactly IrishStukov 20 — 2y

Answer this question