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

The body color won't change?

Asked by 7 years ago

Okay, so I made this script and it's supposed to change the head color to Really red

game.workspace.BrickColor HeadColor = Really Red

P.S. I am also having this problem where I cannot press Run or Play to test the game, the buttons are just grayed out?

1 answer

Log in to vote
1
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
7 years ago
Edited 7 years ago

Ok. Lets start from the beginning..

BrickColor is a property that all BaseParts contain. It takes in a BrickColor value, which is a specific color value. You can make BrickColor values with the BrickColor.new function.

Ex: BrickColor.new("Really red") is red

Now as for applying this to your object, you have to actually index the character's "Head" object. The hierarchy to get to the head object looks like this:

game

Workspace

YourCharacter

Head

So, index the head object and manipulate the BrickColor property properly and you should be good.

game.Workspace.YourCharacter.Head.BrickColor = BrickColor.new("Really red")

Note: simply putting 'workspace' instead of 'game.Workspace' works as well

0
but can you help me with the Roblox Studio glitch also? SeitaiShi 0 — 7y
0
I'm not sure what you mean by "grey buttons". If you go under the Test tab it should look like this http://prntscr.com/dlfxix Goulstem 8144 — 7y
2
Don't forget that you can also use the "Color3.new" function for "BrickColor.new" too. :P "BrickColor.new(Color3.new(0.2, 0.7, 0.35))" TheeDeathCaster 2368 — 7y
Ad

Answer this question