Engine Class
Sparkles
*เนื้อหานี้แปลโดยใช้ AI (เวอร์ชัน Beta) และอาจมีข้อผิดพลาด หากต้องการดูหน้านี้เป็นภาษาอังกฤษ ให้คลิกที่นี่
สรุป
คุณสมบัติ
ตัวอย่างโค้ด
มอบประกายไฟ
local Players = game:GetService("Players")
local function onCharacterSpawned(character)
local hrp = character:WaitForChild("HumanoidRootPart")
-- เพิ่มประกายไฟที่มีสีตรงตามสีลำตัวของผู้เล่น
local sparkles = Instance.new("Sparkles")
sparkles.Parent = hrp
sparkles.SparkleColor = character:WaitForChild("Body Colors").TorsoColor.Color
sparkles.Enabled = true
end
local function onPlayerAdded(player)
player.CharacterAdded:Connect(onCharacterSpawned)
end
Players.PlayerAdded:Connect(onPlayerAdded)เอกสารอ้างอิงเกี่ยวกับ API
คุณสมบัติ
Color
Enabled
ตัวอย่างโค้ด
มอบประกายไฟ
local Players = game:GetService("Players")
local function onCharacterSpawned(character)
local hrp = character:WaitForChild("HumanoidRootPart")
-- เพิ่มประกายไฟที่มีสีตรงตามสีลำตัวของผู้เล่น
local sparkles = Instance.new("Sparkles")
sparkles.Parent = hrp
sparkles.SparkleColor = character:WaitForChild("Body Colors").TorsoColor.Color
sparkles.Enabled = true
end
local function onPlayerAdded(player)
player.CharacterAdded:Connect(onCharacterSpawned)
end
Players.PlayerAdded:Connect(onPlayerAdded)SparkleColor
ตัวอย่างโค้ด
มอบประกายไฟ
local Players = game:GetService("Players")
local function onCharacterSpawned(character)
local hrp = character:WaitForChild("HumanoidRootPart")
-- เพิ่มประกายไฟที่มีสีตรงตามสีลำตัวของผู้เล่น
local sparkles = Instance.new("Sparkles")
sparkles.Parent = hrp
sparkles.SparkleColor = character:WaitForChild("Body Colors").TorsoColor.Color
sparkles.Enabled = true
end
local function onPlayerAdded(player)
player.CharacterAdded:Connect(onCharacterSpawned)
end
Players.PlayerAdded:Connect(onPlayerAdded)