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

Why doesn't this script to change the BrickColor of a WedgePart work?

Asked by 8 years ago

When I first started scripting, the scripting book said that this script will change the brickcolor of a part or wedgepart:

WP  =  Instance.new("WedgePart", game.Workspace) -- This will insert a WedgePart into the workspace.
WP.BrickColor = BrickColor.new("Really Red") -- This will change the WedgePart's brickcolor to Really Red.

or if I have already inserted a wedgepart into the workspace:

game.Workspace.WedgePart.BrickColor = BrickColor.new("Really Red")

I just don't know what is wrong because this script doesn't change the color of the brick. Could anyone fix the script?

0
It's because Really Red doesn't exist, therefore the script will default it to the default grey color. Lua IS CASE SENSITIVE. I can not stress that enough. You would want to use Really red since that color actually exists. Also, make sure there are no other parts named WedgePart in Workspace. Otherwise the script will just pick the first WedgePart it sees. M39a9am3R 3210 — 8y
0
So really the red has to be lowercase or the script will not function correctly? supercoolboy8804 114 — 8y
0
The BrickColor must be "Really red". Not "really red" and not "Really Red". Just "Really red". M39a9am3R 3210 — 8y
0
thanks this worked perfectly supercoolboy8804 114 — 8y

1 answer

Log in to vote
0
Answered by
Voltoxus 248 Moderation Voter
8 years ago

"Really Red" doesn't exist try "Really red" its case sensitive.

Ad

Answer this question