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

Why does my driving for money script not work at all when i try to use it?

Asked by 5 years ago

when i try this code it doesnt work at all please can someone help me or make a new working one

function touch(hit)
local player = hit.Parent
local stats = player:findFirstChild("leaderstats")
local add = 110
if player.Humanoid and script.Parent.SeatWeld then
    script.Parent.sitting.Value = 1
else
    script.Parent.sitting.Value = 0
end

if script.Parent.sitting.Value == 1 then

wait()
        if script.Parent.Throttle == 1 then
            wait(1)
            local money = stats:findFirstChild("money")
            money.Value = money.Value + add
        end 
end
end
script.Parent.Touched:connect(touch)
0
It's ought to be line 14. If Throttle is a Value, do Throttle.Value. DeceptiveCaster 3761 — 5y

Answer this question