Engine Class
Fire
*เนื้อหานี้แปลโดยใช้ AI (เวอร์ชัน Beta) และอาจมีข้อผิดพลาด หากต้องการดูหน้านี้เป็นภาษาอังกฤษ ให้คลิกที่นี่
สรุป
คุณสมบัติ
ตัวอย่างโค้ด
การจุดไฟในคบไฟ
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