Roblox Studio
속성 변경 이벤트 청취
local part = script.Parent
local function updateColor()
local status = part:GetAttribute("Status")
if status == "Active" then
part.Color = Color3.fromRGB(0, 255, 0) -- Green
elseif status == "Inactive" then
part.Color = Color3.fromRGB(255, 0, 0) -- Red
elseif status == "Maintenance" then
part.Color = Color3.fromRGB(0, 0, 255) -- Blue
else
part.Color = Color3.fromRGB(255, 255, 255) -- White
end
end
updateColor()
part:GetAttributeChangedSignal("Status"):Connect(updateColor)속성 설정
local part = script.Parent
part:SetAttribute("Status", "Active")Roblox Studio
생산성을 높일 수 있는 더 많은 유용한 도구를 찾고 계신가요?
더 많은 도구 둔러보기


