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

How to make script detect part colour to change it?

I don't know how to make it so if it detects that my part "laserpart" color is Seashell or 229, 214, 203 it changes the color to Black or 27, 42, 53.

My current script:

if game.Workspace.laserpart.Color.Color3.new == (229, 214, 203) then
	game.Workspace.laserpart.Color = Color3.new(27, 42, 53)
end

1 answer

You made a mistake on your first line. It should be like the second line where you had Color = Color3.new(numbers) instead of Color.Color3.new = (numbers)

if game.Workspace.laserpart.Color == Color3.new(229, 214, 203) then
    game.Workspace.laserpart.Color = Color3.new(27, 42, 53)
end

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