요약
속성
상속된 멤버
코드 샘플
조명 횃불
local Workspace = game:GetService("Workspace")
for _, descendant in Workspace:GetDescendants() do
if descendant.Name == "Torch" and descendant:IsA("BasePart") then
local fire = Instance.new("Fire")
fire.Heat = 10
fire.SecondaryColor = Color3.new(1, 1, 1)
fire.Size = math.max(descendant.Size.X, descendant.Size.Z) -- 두 차원 중 더 큰 값을 선택합니다.
fire.Parent = descendant
end
end불 효과 전환
local part = script.Parent
local clickDetector = Instance.new("ClickDetector")
clickDetector.Parent = part
local fire = Instance.new("Fire")
fire.Parent = part
local light = Instance.new("PointLight")
light.Parent = part
local function onClick()
fire.Enabled = not fire.Enabled
light.Enabled = fire.Enabled
end
clickDetector.MouseClick:Connect(onClick)API 참조
속성
size