• Register a free account to view all forum content. Click here to create your own account.

How to make a buyable car

Joined
Apr 17, 2018
Messages
4,549
Ratings
370 1
Roblox
Born2Golf_OniPad
Discord
Deleted
So what i need help with is where you can step on a car spawn to spawn a car, but you need to pay money for it, and if you leave the game and join a different server, you don't have to pay again. You keep the car.
 
Joined
Apr 17, 2018
Messages
4,549
Ratings
370 1
Roblox
Born2Golf_OniPad
Discord
Deleted
Why don't you look on YT? There's gotta be a video.
AlvinBlox's video has a car spawner GUI. i dont want a gui because I want users to only drive cars in a certain area, like this. Im making a prison game and i dont want people spam spawning a million cars at once inside the prison, people can make a tower of them to troll or make a staircase for people to get out of prison easy, and even drive the cars insdie the prison! No thank you!
 
Joined
Mar 1, 2018
Messages
34
Ratings
5
Roblox
Epic_DogeTDM
Discord
Inverted Zeg#6560
You could create a script inside workspace and add a leaderstat with your name of choice (like 'Cash') Then do some scripting to make it so that if that player has enough money then that player can drive that car. It should look like this:

if Player.leaderstats.INSERTLEADERSTATNAMEHEREORSOMETHING => CURRENCYREQUIREDTOBUYCAR
then do Player.leaderstats.INSERTLEADERSTATNAMEHEREORSOMETHING - CURRENCYREQUIREDTONUYCAR

etc etc etc.
I'm not really a good scripter so yeah, I'll come back to you when I have something
 
Joined
Apr 17, 2018
Messages
4,549
Ratings
370 1
Roblox
Born2Golf_OniPad
Discord
Deleted
You could create a script inside workspace and add a leaderstat with your name of choice (like 'Cash') Then do some scripting to make it so that if that player has enough money then that player can drive that car. It should look like this:

if Player.leaderstats.INSERTLEADERSTATNAMEHEREORSOMETHING => CURRENCYREQUIREDTOBUYCAR
then do Player.leaderstats.INSERTLEADERSTATNAMEHEREORSOMETHING - CURRENCYREQUIREDTONUYCAR

etc etc etc.
I'm not really a good scripter so yeah, I'll come back to you when I have something
I want users to spend money on a one time purchase for the car, then they can spawn and drive as many as they want!
 

LuisDaGamer

Active Member
Joined
Apr 19, 2018
Messages
686
Ratings
60
Roblox
Surf4cePen
Discord
Surf4cePen
[8ih238iheh4oh43r2uouwer12r8ir1239f89t32gbuif nibn2 28h032nuo 32nuo32 i3 2rjo23rnuod2uof32iuf32j32f vc vv viubuohujiyggmjbhkn mbn mgyubn mjgjv nvgtfjfhf 7c5ujyuk76tv5rd setxdgcfvb86vt5red sxtdjgvhb7g65vrdce4r6 cyfhngb5fvrc7dycfhvbkj76vtrf5d ycfvbnbl6t vrfdycfhbmjytvrf dtycfhvb
 
Joined
Mar 1, 2018
Messages
34
Ratings
5
Roblox
Epic_DogeTDM
Discord
Inverted Zeg#6560
You could create a script inside workspace and add a leaderstat with your name of choice (like 'Cash') Then do some scripting to make it so that if that player has enough money then that player can drive that car. It should look like this:

if Player.leaderstats.INSERTLEADERSTATNAMEHEREORSOMETHING => CURRENCYREQUIREDTOBUYCAR
then do Player.leaderstats.INSERTLEADERSTATNAMEHEREORSOMETHING - CURRENCYREQUIREDTONUYCAR

etc etc etc.
I'm not really a good scripter so yeah, I'll come back to you when I have something
I want users to spend money on a one time purchase for the car, then they can spawn and drive as many as they want!
Exactly what I was trying to say
 

ABK2017

l33t
VIP
Joined
Aug 22, 2018
Messages
48
Ratings
12
Roblox
ABK2017
Discord
#2207
You’d need two scripts to handle the transaction with a remote event...if you want the player to keep the car after leaving the server you’d need to add it to a datastore. Or you could probably create a function that creates a “receipt” that gets added to the player, like leaderstats, that the spawn pad can check for. Or if it’s a game pass purchase then obviously just check for that.
 
Joined
Apr 17, 2018
Messages
4,549
Ratings
370 1
Roblox
Born2Golf_OniPad
Discord
Deleted
You’d need two scripts to handle the transaction with a remote event...if you want the player to keep the car after leaving the server you’d need to add it to a datastore. Or you could probably create a function that creates a “receipt” that gets added to the player, like leaderstats, that the spawn pad can check for. Or if it’s a game pass purchase then obviously just check for that.
I also have a thread on data wipe, can you help me with that? (Read all replies so you get what I'm doing)
 
Joined
Apr 17, 2018
Messages
4,549
Ratings
370 1
Roblox
Born2Golf_OniPad
Discord
Deleted
Last edited: