2 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

Change the script

With the map complete, you'll move onto polishing the game. These next articles will cover these finishing touches:

Open the script

Besides just the map, other aspects of Create and Destroy can be customized through a script, a container for code used to run a game. In this case, you'll change the points awarded by destroying buildings.

  1. At the top of the Explorer, a list of everything included in a project, on the right-hand side, type GameSettings.

  2. Double-click GameSettings to open the script editor.

GameSettings script contents

In the script, you'll see a section with the three different point values given to players for large buildings (HighPoints), medium buildings (MediumPoints), and for props (LowPoints).

-- Game Variables
GameSettings.intermissionDuration = 10
GameSettings.roundDuration = 30
GameSettings.minimumPlayers = 1
GameSettings.transitionStart = 3
GameSettings.transitionEnd = 3
GameSettings.pointValues = {
	-- Value types must match folder names to award points correctly
	LowPoints = 0,
	MediumPoints = 10,
	HighPoints = 15,
}

Change the points value

Giving players more points can make smashing buildings feel even more rewarding.

  1. Look for Line 11 in the script. Make the large buildings worth 150 points by changing HighPoints = 15, to HighPoints = 150. Be sure to keep the comma after the number.

    GameSettings.pointValues = {
        -- Value types must match folder names to award points correctly
        LowPoints = 0,
        MediumPoints = 10,
        HighPoints = 150,
    }
  2. Playtest and see how the change feels. Ask yourself if you'd like players to get more points for smashing the medium sized buildings as well. You can change that too.

  3. If desired, take some time to experiment in making changes to the script. For example, changing the number in GameSettings.roundDuration can make rounds go faster or shorter, depending on how many seconds you type.

Note

If the project doesn't work as intended once a change has been made in the script, go back to the script editor and undo your last change.

Share with friends

When you first publish a game, it's automatically set to private. Making it public in the Experience Settings menu will allow friends to be able to join with a link.

  1. In the File → Experience Settings window, select Permissions.

  2. Choose Public and click Save.