Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I make a script that would give you money (yen) when you drive?

I have no idea how to do this. I'm trying to make a game, where you drive to get money. Then you buy better cars, etc.etc.

I don't know how to check if a person is sitting, if they're actually driving and not just afk, and how to make it add money. Can anyone help me?

ik scriptinghelpers isn't a request site, but I need some help :)

2 comments

0

To check if the person is driving or not, you could check the position of a piece of the car and see if it changed with a loop.

3

If you know it isn't a request site then make an attempt and look stuff up.

1 answer

✓ Accepted answer

Well first of all, when you use a car in a game they don't just drive themselves so, you'd have to make the car drive when holding down a certain key. For the information on how to do something when a key is held go here, https://developer.roblox.com/en-us/api-reference/class/UserInputService. You'd basically want to add money whilst they are driving so again this would be using UserInputService

2 comments

0

How do you make it add money? Sorry, I'm trash at scripting lol.

0

Make yen an integer value, and just add to it using yen = yen + 50. To save values to specific players, and in-between sessions, you'll need more advanced code than you'll get from this question.

This discussion is preserved as it was. New answers, comments, and votes are closed.