Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I make all the parts in a group glow at night? [solved]

I tried doing this:

lightPart = game.Workspace.lights:GetChildren()
minutesAfterMidnight = 0

while true do
    if game.Lighting:GetMinutesAfterMidnight() == 6 * 60 then  
    lightPart.Material = Enum.Material.Plastic

end
if game.Lighting:GetMinutesAfterMidnight() == 18 * 60 then 
    lightPart.Material = Enum.Material.Neon
    end
wait(0.1)
end

But it didn't work. Help?

1 answer

lightPart is a table. If you want to get all the parts in the table, you must use a for loop.

It’d be something like this :

for i,part in pairs(lightPart) do
part.Material = Enum.Material.Plastic
end

2 comments

0

thank you i figured it out :)

0

Lighting Charactors?

This discussion is preserved as it was. New answers, comments, and votes are closed.