단일 Color3 값을 위한 컨테이너 개체.
코드 샘플
This code sample sets the Value property of a Color3Value to Red.
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
요약
이벤트
Class.Color3Value.Value가 변경될 때마다 발생합니다.
속성
메서드
이벤트
Changed
Class.Color3Value.Value 의 크기가 변경되면 발생합니다. 새 값이 문자열 대신 인수 개체에 저장되므로 속성이 변경되는 대신 실행됩니다.
이 이벤트는 다른 변경된 이벤트와 마찬가지로 변경된 Color3Value가 언제 변경되었는지 추적하고 변경될 수 있는 다른 값을 추적하는 데 사용할 수 있습니다.
예를 인스턴스, 색상 값을 추적하는 데 Color3Values를 사용하는 게임에서 유용할 수 있습니다.
변경된 이벤트는 대상, 예를 들어 NumberValue 및 StringValue와 같은 유사한 개체에 대해 변경된 이벤트가 있습니다. 필요에 가장 적합한 개체 유형에 따라 Class.StringValue 및 2>Class.NumberValue2>가 있습니다.
매개 변수
변경 후의 새 값.
코드 샘플
The below example, assuming all referenced objects existed, would print the Color3Value's new value each time it changed. In the example below it would print "0.196078, 0.196078, 0.196078".
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)