TSPIKEYMN
(TheSpikeyMan)
1
So I want to change a part’s Brick Color using scripts,
I tried something like this but didnt work
local TeamColor = script.Parent.Parent.Parent.TeamColor.Value
-- Part --
script.Parent.BasePart.Top.BrickColor = TeamColor
Thanks 4 reading,
The Spikey Man
msix29
(msix29)
2
Try color other than Brick color
TSPIKEYMN
(TheSpikeyMan)
3
It Still dosent work, its gray and the TeamColor.Value was Olive
1 Like
can you print out the value of TeamColor?
1 Like
Did u mean smthing like this?
workspace.Part.BrickColor = BrickColor.new("Really red")
or
local team = Instance.new("Team",game:GetService("Teams"))
team.TeamColor = BrickColor.new("Really red")
or else?
local TeamColor = script.Parent.Parent.Parent.TeamColor.Value
-- Part --
script.Parent.BasePart.Top.Color = Color3.new(TeamColor)
I think this will solve your problem.
TSPIKEYMN
(TheSpikeyMan)
9
script.Parent.Parent.Parent.TeamColor is a String Value not a part
Mikixxx0
(Dreamy)
10
Try this:
local TeamColor = script.Parent.Parent.Parent.TeamColor
-- Part --
script.Parent.BasePart.Top.BrickColor = TeamColor.Value
1 Like
TSPIKEYMN
(TheSpikeyMan)
11
Huh? I dont undetstand what ur saying,
TSPIKEYMN
(TheSpikeyMan)
12
isnt
this
local TeamColor = script.Parent.Parent.Parent.TeamColor.Value
-- Part --
script.Parent.BasePart.Top.BrickColor = TeamColor
and urs the same thing?
msix29
(msix29)
13
Try part.brickColor = BrickColor.new[your Value]
I might have miss spelled
TSPIKEYMN
(TheSpikeyMan)
14
That didnt work it went Black when it was suppose Become another color
Can you just switch to Color3Value?
local TeamColor = script.Parent.Parent.Parent.TeamColor.Value
-- Part --
script.Parent.BasePart.Top.Color = TeamColor
Assuming TeamColor is a Color3Value
TSPIKEYMN
(TheSpikeyMan)
16
TeamColor is a Brick Color Value
TSPIKEYMN
(TheSpikeyMan)
17
It said Workspace.Part.Script:4: attempt to index function with BrickColor
there is a difference between this
local TeamColor = script.Parent.Parent.Parent.TeamColor
-- Part --
script.Parent.BasePart.Top.BrickColor = TeamColor.Value
and this
local TeamColor = script.Parent.Parent.Parent.TeamColor.Value
-- Part --
script.Parent.BasePart.Top.BrickColor = TeamColor
you cannot put propierts on variables, in case the first code block i said its the correct one
The string needs to be one of these brick color names here:
local TeamColor = script.Parent.Parent.Parent.TeamColor
-- Part --
script.Parent.BasePart.Top.BrickColor = BrickColor.new(TeamColor.Value)
Mikixxx0
(Dreamy)
20
Ok so, your value must be “BrickColorValue” then set it to your wanted color
local TeamColor = script.Parent.Parent.Parent.TeamColor
-- Part --
script.Parent.BasePart.Top.BrickColor = TeamColor.Value
I tested it and it works!
TSPIKEYMN
(TheSpikeyMan)
22
Ok, what you told worked, Thanks for the help
Mikixxx0
(Dreamy)
23
I literally said the same thing before him in my message! 
1 Like