Writing Your First Script in Roblox

Roblox scripts are written in Lua, and the basic pattern is always the same: name the object, name the property, set the value.

Changing a brick

A script starts with script or game, then the path to the object, then the property and value. For example:

game.Workspace.Base.Reflectance = 8

That makes the part called Base shiny. "Workspace" comes first because that is where all parts live; then the part name; then the property; then the amount.

Other common properties

  • Transparency instead of Reflectance makes the part see-through.
  • CanCollide = false lets players walk through it.
  • Size = Vector3.new(10, 10, 10) resizes it — larger numbers, larger part.

For meshes or anything non-standard, use the pattern BRICKNAME.Mesh.Scale = Vector3.new(10, 10, 10), and keep the game.Workspace prefix.

That is the foundation. Once it makes sense, the Roblox Studio documentation covers the rest, and asking a specific question will get a specific answer.