Hello! I am very new to programming and want to make a script that allows players to make money depending on the **speed **of the car. I also want it so that they **have to be in the vehicle **seat of the car. Thanks,
repplayer
COMMUNITY QUESTION
How to make A "Drive For Money" script for my vehicle/racing game??
1 answer
You would need to write a script that follows a ratio for example
while true do
local speed = game.Players.LocalPlayer.TheCurrentSpeedValueHere.Value
local money = speed*3 -- replace 3 with the ratio you want it to be in this case the money earned will be their speed times three
end
local cash = game.Players.LocalPlayer.TheirCurrentCash.Value
while true do
cash = cash + money
wait(1) --change 1 to the amount of time until their cash increases again because of their speed.
end
This takes their speed and multiplies it by 3 which u can set to any number you want depending on the ratio and adds it to their cash value. If you haven't already,you need to make a script that imports or creates an int value that can keep track of these things. Hope this helped. Note: Make sure to attempt your issue before asking people to do it for you.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
This is not a request site, this is a site to help people if they have problems with their code, please at least make an attempt to make the code before asking us what is wrong with it
you would need to create a script that depends on a ratio for example
In my answer