Customize and Share

This last lesson is all about putting the final touches on the driftspeeder, such as making it faster or quicker to turn. Once finished, take flight and share your work with friends.

Modifying the Engine

To change a driftspeeder's speed or how quickly it can turn, you'll open the Settings script. In Roblox, code is typed inside of scripts using the coding language Lua. Games often have separate scripts for each thing the game needs to do.

  1. Click on your speeder.
  2. In the Explorer, look for the Garage folder and your driftspeeder.
  3. Next to the driftspeeder's name, click the ▸ arrow to expand it. Then, find Body and click the ▸ to see the attached script.
  4. Double-click the Settings script to open it.

The Settings Script

In the script, you'll see words like DefaultSpeed or BoostSpeed. These words are variables. Variables are placeholders for information that can be changed as needed.


-- ================================================================================
-- Settings
-- ================================================================================
local Settings = {}
Settings.DefaultSpeed = 100 -- Speed when not boosted [Studs/second, Range 50-300]
Settings.BoostSpeed = 200 -- Speed when boosted [Studs/second, Maximum: 400]
Settings.BoostAmount = 10 -- Duration of boost in seconds
Settings.Steering = 5 -- How quickly the speeder turns [Range: 1-10]
-- ================================================================================
return Settings

Make your speeder the fastest on the track by increasing the default speed setting.

  1. Change the number in the line Settings.DefaultSpeed = 100 to any number between 50 (slower) and 300 (faster).


    Settings.DefaultSpeed = 100 -- Speed when not boosted [Studs/second, Range 50-300]
    Settings.BoostSpeed = 200 -- Speed when boosted [Studs/second, Maximum: 400]
    Settings.BoostAmount = 10 -- Duration of boost in seconds
    Settings.Steering = 5 -- How quickly the speeder turns [Range: 1-10]
  2. Playtest and see how the change feels. Ask yourself if the speed fits the driftspeeder's design and if you'd be excited using it in a race.

  3. Stop the playtest when finished. Remember, because you can't use your mouse while flying, press E to exit the speeder so you can stop the playtest.