Greetings,
I have been trying to script some lights that are in one model and change all of their SurfaceLights so when I click the ON button they all turn on and every single SurfaceLight of theirs changes properties.
Here is the script I have tried:
neonmain1 = game.Workspace.neonlights1.neonmain1
neonmodel1 = game.Workspace.neonlights1.neonmain1.neonmodel1:GetChildren()
neonmodel2 = game.Workspace.neonlights1.neonmain1.neonmodel11:GetChildren()
onclick1.MouseClick:Connect(function()
neonmodel1.Material = "Neon"
neonmodel2.Material = "Neon"
end)
offclick1.MousClick:Connect(function()
neonmodel1.Material = "SmoothPlastic"
neonmodel2.Material = "SmoothPlastic"
end)
What the names look like in Explorer:
Explorer
Workspace
neonlights1
neonmain1
neonmodel1
neon1
Surface1
ne##### Surface1
neon1
Surface1
neon1
Surface1
neon1
neonmodel2
neon2
Surface2
neon2
Surface2
neon2
Surface2
neon2
Surface2
neon2
On1
OnClick1
Off1
#########
What would I do to change all of the SurfaceLights at once aswell as the neon1 and neon2 part to neon when on and SmoothPlastic when off.
-Thanks for the help :D |