Codectionary / Developer documentation / Luau

PointLight

Emit light in all directions from a part or attachment.

Why use PointLight?

A PointLight adds local illumination around its parent. It is useful for lamps, glowing pickups, and nearby feedback rather than changing the whole scene’s Lighting service.

Try it in Roblox Studio

Create a Part named Lamp in Workspace, then put this Script in ServerScriptService. The light is visible in Studio when lighting and graphics settings allow it.

Syntax

light.Range = 16
light.Brightness = 2

Examples

PointLight

Add a blue point light to an existing lamp.

local lamp = workspace:WaitForChild("Lamp")
assert(lamp:IsA("BasePart"))
local light = Instance.new("PointLight")
light.Color = Color3.fromRGB(80, 170, 255)
light.Brightness = 2
light.Range = 16
light.Parent = lamp
  1. The light inherits its position from the Lamp part.
  2. Color, Brightness and Range describe the local lighting effect.
  3. Parenting last makes the configured light active; it does not turn the Part material into a physical light source.

Best practices

  • Use a sensible Range and number of lights for performance.
  • Test both the light and the unlit scene for readable contrast.

Runtime & versions

Luau host; Roblox engine examples require Roblox Studio. Feature availability depends on the language and runtime version used by your project; consult the official reference below.

Luau documentation

Specifications & further reading