EngediKimHyeYoung / Roblox

0 stars 0 forks source link

while 반복문을 이용한 신호등 만들기 #10

Open EngediKimHyeYoung opened 3 years ago

EngediKimHyeYoung commented 3 years ago

local red = game.Workspace.SignalLight.Red local yellow = game.Workspace.SignalLight.Yellow local green = game.Workspace.SignalLight.Green

local offColor = Color3.fromRGB(0, 0, 0) local redOn = Color3.fromRGB(255, 0, 0) local yellowOn = Color3.fromRGB(255, 255, 0) local greenOn = Color3.fromRGB(0, 255, 0)

while true do red.Color = redOn yellow.Color = offColor green.Color = offColor wait(3)

red.Color = offColor
yellow.Color = yellowOn
wait(3)

yellow.Color = offColor
green.Color = greenOn
wait(3)

end