pls help me! How can i make a gui that changes colors every 10 sec and depending on the color that it is , it will make a platform with the same color disappear ! Pls help ! i cant find the answer for about a week , pls help
✓ ANSWER ACCEPTED
a gui that makes blocks disappear depending on the color?
1 answer
✓ Accepted answer
local platforms = workspace.PlatformsFolder --put all the platforms in a folder
colors = { --table of colors
BrickColor.new("Really blue"), --Really red
BrickColor.new("Really red"), --Really blue
BrickColor.new("Deep orange") --Deep orange
}
while true do
local color = colors[math.random(1,#colors)] --index the table and get a random color with math.random
print(color)
for i,v in pairs (platforms:GetChildren()) do --get children returns a table of the children in the platforms folder. for i,v in pairs goes through this table
if v:IsA("BasePart") then --check if value is a base part
if v.BrickColor == color then --if the color of the value is the same as the random color chosen then
v.CanCollide = false
v.Transparency = 1
else --if not
v.CanCollide = true
v.Transparency = 0
end
end
end
wait(5) --wait however long in between color changes
end
Okay, there turned out to be a bunch of issues in my original script. I went into studio and fixed it. This should work. Make sure when you're picking your platform colors, you do so using brick color and not manually typing the rgb values. For some reason I couldn't get it so that you can have custom colors.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
oh k , thanks imma try , ty alot