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

Is there a way to change the texture of just the items that are white?

Hello world

Is there a way to change the texture of just the items that are white?

In a folder i have a bounch of Parts, but i want to change the texture of the Parts to SNOW, but just to the ones that are white, not of that ones that are green or smothing else, How i can do that?

1 answer

✓ Accepted answer

Well, for example, if your color is 255,255,255 (pure white) you would use this code:

for _, i in pairs(workspace:GetDescendants()) do
	if i:IsA("BasePart") then
		if i.Color == Color3.fromRGB(255,255,255) then
			-- code here
		end
	end
end

Hope this helps!

5 comments

0

Hello Sir, at line 4 i come whit this:

0

Part.Material = ("Snow")

0

is just that.. i cant unterstand how the GetDescendants are called now..

0

i finaly found it :D

0

i.Material = ("Snow")

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