I'm working on an if statement that if the descendants is a brick and its material is neon, it changes their color. I'm using IsA to do this, but I'm not familiar with it.
Could someone help me with how I should write it?
this should work.
1 | for i,v in pairs (workspace:GetDescendants()) do |
2 | if v.Material = = Enum.Material.Neon then |
3 | -- script |
4 | end |
5 | end |
1 | for i,v in pairs (workspace:GetDescendants()) do |
2 | if v.Material = = Enum.Material.Neon then |
3 | v.Color 3 = Color 3. fromRGB( 255 , 0 , 0 ) |
4 | end |
5 | end |