Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

is there a way to negate parts with code?

Asked by 3 years ago
Edited 3 years ago

I need to negate two parts to change their color, is this possible with code? If it is not, can you give me recommendations on what to do with an accessory to change its color.

0
Why the hell would you use negation for color-changing? If you wish to change an accessory's color, you must reference it's VertexColor property via it's Mesh, and supply a Vector3 with the identical numbers of a Color3 datatype. Ziffixture 6913 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

Negation of parts doesn't do anything for the color. But, here is something you could do:

script.Parent.BrickColor = BrickColor.ColorYouWant()

Or you could do:

script.Parent.Color3 = Color3.new(numbers)

BrickColor and Color3 are confusing, so here are some sources to help you understand: https://developer.roblox.com/en-us/api-reference/datatype/Color3 https://developer.roblox.com/en-us/api-reference/datatype/BrickColor

Ad

Answer this question