How do I change the color of a brick? (I'm extremely new)

Hello programmers! I’ve recently taken up scripting, and I’m looking for some help on a very simple script.

I’m trying to make a brick change color, but I’m not sure how.

Here’s what I currently have in the script:

local Test = game.Workspace.test
local Baseplate = game.Workspace.Baseplate

wait(10)
Test.Material = "Neon"
Test.Anchored = false
wait(3)
Test.Size = Baseplate.Size
wait(3)
Test.Color = "Really red"

However, whenever I run it, the output states that “color3 expected, got string” in red text, and the color change doesn’t happen.

Would appreciate some help!

(Please note, I started scripting yesterday, so a super simple explanation would be awesome.)

2 Likes

Replace “Really Red” with BrickColor.new("Really Red")

And you might want to replace Material = "Neon" with Material = Enum.Material.Neon

If you have any more questions feel free to ask!

2 Likes

I really appreciate the help. Could you please also tell me how to change the size? I tried to enter the dimensions but it doesn’t work (hence why I had it at baseplate size)

Gonna be honest here, I’ve never changed the size of a part with a script.

You can probably get some answers from these documentations:
Vector3 | Documentation - Roblox Creator Hub Note: on this one it uses position as an example, you can change that to size
BasePart | Documentation - Roblox Creator Hub

1 Like

Thanks for all the help! Devforum is so useful.

1 Like

Size use
x = front and back(red color circle)
y = how tall(green circle)
z = left and right(blue circle)

script.Parent.Size = Vector3.new(--insert x,inset y, insert z)
1 Like