SurfaceLight
A SurfaceLight is a light source that emits illumination of a specified Light.Color and Light.Brightness from a SurfaceLight.Face for a specified SurfaceLight.Range.
In order for a SurfaceLight to provide illumination, it must be the direct child of a BasePart or Attachment (the part or attachment itself must be a descendant of the Workspace). If a SurfaceLight is parented to a part, then the light will emanate from the part's selected face(s). If parented to an attachment SurfaceLight is equivalent to a SpotLight.
For more light types, please see the see also section.
See Also
Code Samples
This example creates a new anchored BasePart named Part at the position {0, 0, 0}.
It then creates a new surface light with brightness of 1, Color3 color of {255/255, 255/255, 255/255} (white) and range of 16 studs. The surface light's parent is set to the BasePart we created. To view the light, navigate to the part at {0, 0, 0} or move the Part created to a location visible to the player.
Please note that the properties of the created surface light can easily be changed by modifying the property values in the code sample below. Additionally, if you have an existing surface light, you can also create a similar script that modifies that surface light instead of creating a new BasePart and light.
local part = Instance.new("Part")
part.Anchored = true
part.Position = Vector3.new(0, 0, 0)
part.Parent = workspace
local light = Instance.new("SurfaceLight")
light.Color = Color3.fromRGB(255, 255, 255)
light.Brightness = 1
light.Range = 16
light.Parent = part
Summary
Properties
The angle of which the light is shone from the SurfaceLight.
Sets the side of the parent that the SurfaceLight comes from.
The distance from the SurfaceLight's face that will illuminate.
Sets how bright the emitted light is, defaults to 1.
The color of the emitted light.
If set to true, light will be emitted from the source object.
If set to true, will project shadows if light is blocked by an obstacle.