rojo/.cursor/rules/roblox/reference/engine/classes/SpotLight.yaml
2026-02-02 12:08:47 -06:00

100 lines
2.8 KiB
YAML

# This file is automatically generated. Please don't edit it manually.
# To submit a bug report on the content, see
# https://devforum.roblox.com/c/bug-reports/documentation-issues/72
name: SpotLight
type: class
memory_category: Instances
summary: |
A light source that emits light directionally in the shape of a cone with a
spherical base.
description: |
A **Spotlight** emits light of a specified `Class.Light.Color|Color` and
`Class.Light.Brightness|Brightness` in the shape of a cone with a spherical
base. This object is ideal for **directional** light sources like flashlights
and headlights.
`Class.SpotLight.Range|Range` controls the distance of illumination and
`Class.SpotLight.Angle|Angle` defines the angle of light emission from the
cone's apex as illustrated below.
A spotlight must be a direct child of a `Class.BasePart` or `Class.Attachment`
and will exhibit the following behavior:
- When the spotlight is parented to a `Class.BasePart`, the
`Class.SpotLight.Face|Face` property determines the face of the part from
which light emanates.
- Although `Class.Attachment|Attachments` don't have faces, the
`Class.SpotLight.Face|Face` property determines the axis of the attachment
from which light emanates; **-Z** is front, **+X** is right, **+Y** is top,
etc.
See also `Class.SurfaceLight` and `Class.PointLight`.
code_samples: []
inherits:
- Light
descendants: []
tags: []
deprecation_message: ''
properties:
- name: SpotLight.Angle
summary: |
The angle of which the light is shone from the SpotLight.
description: |
The angle of which the light is shone from the SpotLight.
code_samples: []
type: float
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Basic
- name: SpotLight.Face
summary: |
Sets the side of the parent that the SpotLight comes from.
description: |
Sets the side of the parent that the SpotLight comes from.
code_samples: []
type: NormalId
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Basic
- name: SpotLight.Range
summary: |
The size of the area that the SpotLight will illuminate.
description: |
The size of the area that the SpotLight will illuminate.
code_samples: []
type: float
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: true
capabilities:
- Basic
methods: []
events: []
callbacks: []