Sparkles

非推奨を表示

*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。

スパークルは、いくつ

Class.Sparkles.Enabled がオフ

スパークルパーティクルは、BasePart の中心からのみ発生し、その親になります。スパークルオブジェクトを Attachment に親化すると、パーティクルの開始位置をカスタマイズできます。

コードサンプル

The code sample below gives any new players sparkles that are colored the same as their torso color.

Give Sparkles

local Players = game:GetService("Players")
local function onCharacterSpawned(character)
local hrp = character:WaitForChild("HumanoidRootPart")
-- Add sparkles that are colored to the player's torso color
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)

概要

プロパティ

  • 非表示
    複製されていません
    並列読み取り
    非推奨

    キラキラパーティクルの色を決める。

  • 並列読み取り

    キラキラがエミットされるかどうかを決定します。

  • 非表示
    複製されていません
    並列読み取り
  • 並列読み取り

    キラキラパーティクルの色を決める。

  • 並列読み取り

プロパティ

Color

非表示
複製されていません
並列読み取り

色プロパティは、Sparkles オブジェクト (既存のすべてのパーティクルと将来のすべてのパーティクル) のすべてのパーティクルの色を決定します。ParticleEmitter.Color と同様に、ColorSequence のみが�

キラキラには、ParticleEmitter.LightEmission のパーティアル効果があるため、暗い色は透明になり、白い色は明るくなります。

コードサンプル

The code sample below gives any new players sparkles that are colored the same as their torso color.

Give Sparkles

local Players = game:GetService("Players")
local function onCharacterSpawned(character)
local hrp = character:WaitForChild("HumanoidRootPart")
-- Add sparkles that are colored to the player's torso color
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)

Enabled

並列読み取り

有効 プロパティ、 much like ParticleEmitter.Enabled 、は、スパークルパーティクルがエミットされるかどうかを決定します。すでにエミットされているパーティクルは、その有効期限が切れるまでレンダ


local Debris = game:GetService("Debris")
local part = script.Parent
function stopSparkling(sparkles)
sparkles.Enabled = false -- No more new particles
Debris:AddItem(sparkles, 4) -- Remove the object after a delay (after existing particles have expired)
end
stopSparkling(part.Sparkles)

コードサンプル

The code sample below gives any new players sparkles that are colored the same as their torso color.

Give Sparkles

local Players = game:GetService("Players")
local function onCharacterSpawned(character)
local hrp = character:WaitForChild("HumanoidRootPart")
-- Add sparkles that are colored to the player's torso color
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)

LocalTransparencyModifier

非表示
複製されていません
並列読み取り

SparkleColor

並列読み取り

このプロパティは Sparkles.Color と同じに機能します。

SparkleColor プロパティは、Sparklesオブジェクト(既存のすべてのパーティクルと将来のすべてのパーティクル)によってエミットされるすべてのパーティクルの色を決定します。ParticleEmitter.Color およびDat

キラキラには、ParticleEmitter.LightEmission のパーティアル効果があるため、暗い色は透明になり、白い色は明るくなります。

コードサンプル

The code sample below gives any new players sparkles that are colored the same as their torso color.

Give Sparkles

local Players = game:GetService("Players")
local function onCharacterSpawned(character)
local hrp = character:WaitForChild("HumanoidRootPart")
-- Add sparkles that are colored to the player's torso color
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)

TimeScale

並列読み取り

方法

イベント