단일 Color3에 대한 컨테이너 개체.
코드 샘플
This code sample sets the Value property of a Color3Value to Red.
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
요약
이벤트
변경될 때마다 Color3Value.Value가 발사됩니다.
속성
메서드
이벤트
Changed
변경될 때마다 Color3Value.Value 의 Color3Value 가 발사됩니다.속성이 변경되는 문자열 대신 새 값이 인수 개체에 저장되어 실행됩니다. It will run with the new value being stored in the argument object, instead of a string representing the property being changed.
이 이벤트는 다른 변경된 이벤트와 마찬가지로 색상3값이 변경될 때와 변경될 수 있는 다양한 값을 추적하는 데 사용할 수 있습니다.
인스턴스들어, 사용자 지정 가능한 의상이나 아이템을 사용하여 게임에 색상과 같은 값을 추적하는 게임에서 Color3Values를 사용하는 것이 유용할 수 있습니다.
요구 사항에 가장 적합한 개체 유형에 따라 NumberValue 및 StringValue와 같은 유사한 개체에 대해 동등한 변경 이벤트가 존재합니다.
매개 변수
변경 후의 새 값.
코드 샘플
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".
local value = Instance.new("Color3Value")
value.Parent = workspace
value.Changed:Connect(function(NewValue)
print(NewValue)
end)
value.Value = Color3.fromRGB(50, 50, 50)