generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Scripting Help

Previous Thread :: Next Thread 
ThunderGemios10 is not online. ThunderGemios10
Joined: 13 Dec 2013
Total Posts: 160
20 Aug 2016 08:05 PM
Hello!

I am working on a racing game, and i have a few questions.

How can i script a shop and you can select a car, Then when the race starts, The car that you selected will be spawned in the race tracks.

Also, No. I'm not asking anyone to make a script for me.

I am just asking how can i script it myself.
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
20 Aug 2016 08:07 PM
local backup = car
car.Parent = game.ReplicatedStorage


local cars = {
["GT 500"] = car
}

function spawncar(t)
local chosen = cars[t]
if chosen then
local new = chosen:Clone()
new.Parent = something
new:SetPrimaryPartCFrame(the spawnpoint cframe)
end
end
Report Abuse
ThunderGemios10 is not online. ThunderGemios10
Joined: 13 Dec 2013
Total Posts: 160
20 Aug 2016 08:09 PM
How can i use this?
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
20 Aug 2016 08:15 PM
if you learn what dictionaries are you can use them to store information in the form of variables inside of a table

so if you did

spawncar("GT 500")

it would get

cars["GT 500"] which will be your car
Report Abuse
ThunderGemios10 is not online. ThunderGemios10
Joined: 13 Dec 2013
Total Posts: 160
20 Aug 2016 08:19 PM
Yes, But How can the player select the car from the shop?
Report Abuse
ThunderGemios10 is not online. ThunderGemios10
Joined: 13 Dec 2013
Total Posts: 160
20 Aug 2016 08:42 PM
Bump
Report Abuse
ThunderGemios10 is not online. ThunderGemios10
Joined: 13 Dec 2013
Total Posts: 160
20 Aug 2016 11:28 PM
Bump 2
Report Abuse
pullman45 is not online. pullman45
Joined: 09 Jul 2012
Total Posts: 2891
20 Aug 2016 11:45 PM
git gud
Report Abuse
ThunderGemios10 is not online. ThunderGemios10
Joined: 13 Dec 2013
Total Posts: 160
20 Aug 2016 11:57 PM
lol
Report Abuse
Kervos is not online. Kervos
Joined: 27 Aug 2015
Total Posts: 322
21 Aug 2016 12:00 AM
guis
Report Abuse
ThunderGemios10 is not online. ThunderGemios10
Joined: 13 Dec 2013
Total Posts: 160
21 Aug 2016 12:01 AM
I know, But i'm asking a scripting question. = =
Report Abuse
Kervos is not online. Kervos
Joined: 27 Aug 2015
Total Posts: 322
21 Aug 2016 12:02 AM
interactive guis
Report Abuse
ThunderGemios10 is not online. ThunderGemios10
Joined: 13 Dec 2013
Total Posts: 160
21 Aug 2016 12:28 AM
Again, I'm not asking for help about GUIs, I am asking help about scripting.
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
21 Aug 2016 12:28 AM
bruh call the function with the selected car

:)
Report Abuse
ThunderGemios10 is not online. ThunderGemios10
Joined: 13 Dec 2013
Total Posts: 160
21 Aug 2016 12:34 AM
Yeah i know, I'm scripting right now.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image