so i made a screen and scripted it so it chooses a random color from red, green ,blue, yellow. there are 4 platforms and i want to know how can i make the platform with the color that is shown on the screen to disappear. Here is script of random colors on screen:
wait(30)
while true do
1 | wait( 15 ) |
local colors = {
1 | Color 3. fromRGB( 245 , 205 , 48 ); |
2 |
3 | Color 3. fromRGB( 0 , 137 , 207 ); |
4 |
5 | Color 3. fromRGB( 250 , 40 , 28 ); |
6 |
7 | Color 3. fromRGB( 0 , 200 , 0 ); |
}
local color = colors[math.random(1, #colors)]
1 | script.Parent.Color = color |
2 | wait( 3 ) |
end
you can do like a localscript:
Screencolor.Changed:Connect
-- then check what color the Screen is -- then make if statements to make the other 3 platforms dissapear and then only 1 appear
if backgroundcolor3 == Color3.fromRGB(0,200,0) -- 4 main if statements -- make 3 other platforms dissapear and the one you want appear elseif color..... then -- make 3 other platforms dissapear and the one you want appear elseif color.. then -- make 3 other platforms dissapear and the one you want appear elseif color ... then -- make 3 other platforms dissapear and the one you want appear
like that
It's all simplified, I'm just giving you Instructions and you can code the full thing.