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?
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.
for i,v in pairs(workspace:GetDescendants()) do
if v.Material == Enum.Material.Neon then
-- script
end
end
for i,v in pairs(workspace:GetDescendants()) do
if v.Material == Enum.Material.Neon then
v.Color3 = Color3.fromRGB(255,0,0)
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Thank you so much!
no problem :D