This is a support category for asking questions about how to get something done on the Roblox websites or how to do something on Roblox applications such as Roblox Studio.
A few days ago, I made a city map, with several grouped buildings. In these buildings, I have further divided them into sections of the building, with window panes and window lights.
What I’m trying to do is, every few minutes, make these dark window lights have a 50/50 chance of becoming “Really Black” or “Institutional White”
I already set the material of these light blocks to Neon,
Since I’m a very inexperienced developer, I don’t really know how to achieve this sort of thing.
I have tried to use :GetDescendants() to achieve this, but I don’t think I made the script the right way.
This is the script that I made, with the help of some tutorials; It is a child of the Workspace and I am trying to make it look for any descendant of the workspace with the name “WindowLight”, but it does not work.
local lights = script.Parent:GetDescendants("WindowLight")
for _, step in ipairs(lights) do
if step:Isa("Part") then
step.BrickColor = BrickColor.new("Cool yellow")
end
end