Light (조명)

유형

유형세부 사항
PointLight단일 지점에서 모든 방향으로 빛을 발산합니다.
SpotLight원뿔 형태로 빛을 발산하여 집중된 광선을 만듭니다.
SurfaceLight표면에서 한 방향으로 빛을 발산하여 넓은 영역을 밝힙니다.

속성

속성세부 사항
Brightness빛의 강도를 제어합니다.
Color빛의 색상을 설정합니다.
Range빛이 닿는 거리를 결정합니다.
Shadows빛이 투사하는 그림자를 활성화하거나 비활성화합니다.
Angle빛의 광선 확산을 정의합니다. (SpotLight 및 SurfaceLight)
Face빛이 발사되는 방향을 지정합니다. (SpotLight 및 SurfaceLight)
Enabled조명을 켜거나 끕니다.

조명 예시

PointLight 사용하기

local part = script.Parent 

local pointLight = Instance.new("PointLight")
pointLight.Parent = part

pointLight.Brightness = 2 -- Controls the intensity of the light
pointLight.Color = Color3.fromRGB(255, 255, 255) -- White light
pointLight.Range = 16 -- How far the light reaches
pointLight.Shadows = true -- Enable shadows
pointLight.Enabled = true -- Ensure the light is turned on

-- Function to toggle the light on and off every 1 second
while true do
	pointLight.Enabled = not pointLight.Enabled -- Toggle the light's enabled state
	wait(1) -- Wait for 1 second before toggling again
end
Image 1
Roblox Studio

SpotLight 사용하기

local part = script.Parent 

local spotLight = Instance.new("SpotLight")
spotLight.Parent = part

spotLight.Brightness = 8 -- Controls the intensity of the light
spotLight.Color = Color3.fromRGB(255, 255, 255) -- White light
spotLight.Range = 16 -- How far the light reaches
spotLight.Shadows = true -- Enable shadows
spotLight.Angle = 90 -- Width of the cone (in degrees)
spotLight.Face = Enum.NormalId.Front -- Direction the light is facing
spotLight.Enabled = true -- Ensure the light is turned on

-- Function to toggle the light on and off every 1 second
while true do
    spotLight.Enabled = not spotLight.Enabled -- Toggle the light's enabled state
    wait(1) -- Wait for 1 second before toggling again
end
Image 1
Image 2
Roblox Studio

SurfaceLight 사용하기

local part = script.Parent 

local pointLight = Instance.new("PointLight")
pointLight.Parent = part

pointLight.Brightness = 2 -- Controls the intensity of the light
pointLight.Color = Color3.fromRGB(255, 255, 255) -- White light
pointLight.Range = 16 -- How far the light reaches
pointLight.Shadows = true -- Enable shadows
pointLight.Enabled = true -- Ensure the light is turned on

-- Function to toggle the light on and off every 1 second
while true do
	pointLight.Enabled = not pointLight.Enabled -- Toggle the light's enabled state
	wait(1) -- Wait for 1 second before toggling again
end
Image 1
Roblox Studio

이 튜토리얼이 도움이 되셨다면, 저의 작업을 지원하기 위해 커피 한 잔을 사주시면 감사하겠습니다.

지원해 주셔서 정말 감사합니다!

커피 한 잔 사주기