Color3Value
사용되지 않는 항목 표시
A container object for a single Color3 value.
코드 샘플
Set Color3Value
local myColor3Value = script.Parent
myColor3Value.Value = Color3.new(1, 0, 0) -- Red
-- You can also store the color of a BrickColor value by accessing BrickColor's Color property, which is a Color3:
local someBrickColor = BrickColor.new("Really red")
myColor3Value.Value = someBrickColor.Color
요약
이벤트
Fired whenever the Color3Value.Value is changed.
속성
메서드
이벤트
Changed
Fired whenever the Color3Value.Value of the Color3Value is changed. It will run with the new value being stored in the argument object, instead of a string representing the property being changed.
This event, like other changed events, can be used to track when an Color3Value changes and to track the different values that it may change to.
For instance, this may be useful in games that rely on Color3Values to track values such as colors for games using customizable outfits or items.
Equivalent changed events exist for similar objects, such as NumberValue and StringValue, depending on what object type best suits the need.
매개 변수
The new value after the change.
코드 샘플
How to Use Color3Value.Changed
local value = Instance.new("Color3Value")
value.Parent = workspace
value.Changed:Connect(function(NewValue)
print(NewValue)
end)
value.Value = Color3.fromRGB(50, 50, 50)