I have 5 parts in a model named "Part" and I don't know how to change the properties of the children. The ? is something I feel like is missing that needs to be fixed.
This script is for a window script, when it becomes 16:00 it changes the glass in the model to the items below.
glass = script.Parent:GetChildren()
while true do
if game.Lighting:GetMinutesAfterMidnight() > 16 * 60 then
wait(math.random(10,50))
for i, v in pairs(glass) do
if glass.Name == "Part" then
?.Transparency = 0
?.Material = Enum.Material.Neon
?.BrickColor = Color3.new("White")
end
end
end
if game.Lighting:GetMinutesAfterMidnight() > 23 * 60 then
wait(math.random(20,50))
for i, v in pairs(glass) do
if glass.Name == "Part" then
?.Transparency = .6
?.Material = Enum.Material.Glass
?.BrickColor = Color3.new("Dark Stone Grey")
end
end
end
end
I would appreciate it if I could get some insight on how to make this for script thing work.
