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~~
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.
Closed as Not Constructive by Ziffixture
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?