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

When you are driving a transport, script adding a cash to leadersboard. How to do it?

Asked by 6 years ago

I want something looks like in Vehicle Simulator, when you're driving a car or other vehicle adding money to leadersboard. But how to do it? If you know — put script for Roblox.

2 answers

Log in to vote
0
Answered by 6 years ago

Scriptinghelpers is not a request site, show us what you already tried and what it did/didn't do.

0
Ok, wait a second pls. Bob_Jonez 0 — 6y
0
local db = 0 function onTouched(hit) if db == 0 then db = 1 local owner = script.Parent.Parent.Parent.Parent.Parent.Name local user = game.Players:findFirstChild(owner) local stats = user:findFirstChild("leaderstats") while true do wait() if script.Parent.Throttle == 1 then wait(1) local cash = stats:findFirstChild("Money") Bob_Jonez 0 — 6y
0
add it to your post.. DanielDeJong3 158 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

local db = 0 function onTouched(hit) if db == 0 then db = 1

       local owner = script.Parent.Parent.Parent.Parent.Parent.Name
       local user = game.Players:findFirstChild(owner)
       local stats = user:findFirstChild("leaderstats")

while true do wait() if script.Parent.Throttle == 1 then wait(1) local cash = stats:findFirstChild("Money") cash.Value = cash.Value + 250 --Edit This!! end end db = 0 end end

script.Parent.Touched:connect(onTouched)

Try to fix! It doesn't work.

Answer this question