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

Does This Script Work For Driving To Earn Money I dont want mess up & then not notice?

Asked by 5 years ago
Edited 5 years ago

Does This Script Work For Driving To Earn Money? Im Not Sure.

local add = 110

01script.Parent.Touched:connect(function(hit)
02    local character = hit.Parent
03    local player = game.Player:GetPlayerFromCharacter(character)
04 
05    if player then
06        if script.Parent:FindFirstChild("SeatWeld") then
07            script.Parent.sitting.Value = 1
08            wait()
09            if script.Parent.Throttle == 1 then
10                wait(1)
11                local money = stats:FindFirstChild("money")
12                money.Value = money.Value + add
13            end
14        else
15            script.Parent.sitting.Value = 0
16        end
17 
18    end
19 
20end)
1
I recommend trying to run the script Shubu13 29 — 5y

1 answer

Log in to vote
0
Answered by
Shubu13 29
5 years ago
Edited 5 years ago

I don't know much but I think you need to reference the stats.

01local add = 110
02script.Parent.Touched:connect(function(hit)
03    local character = hit.Parent
04    local player = game.Player:GetPlayerFromCharacter(character)
05    local stats = player.Stats
06    if player then
07        if script.Parent:FindFirstChild("SeatWeld") then
08            script.Parent.sitting.Value = 1
09            wait()
10            if script.Parent.Throttle == 1 then
11                wait(1)
12                local money = stats:FindFirstChild("money")
13                money.Value = money.Value + add
14            end
15        else
View all 21 lines...
Ad

Answer this question