Heya, I've created multiple scripts so that when a player clicks a button, a String Value gets cloned and inserted into the player. For some reason, I keep on getting the error "Value is not a valid member of BrickColor" in another script. Anyone know why?
String Value Giver
local Text = workspace.Intermission2
local Door = workspace.Door2
local ServerStorage = game:GetService("ServerStorage")
local TeamColor = ServerStorage.TeamColor
local ReadyCount = ServerStorage.ReadyCount
script.Parent.ClickDetector.MouseClick:Connect(function(player)
script.Parent.ClickDetector:Destroy()
workspace.Intermission2.SurfaceGui.TextLabel.Text = "Please wait..."
Door.CanPass.Disabled = true
Door.CanCollide = true
Door.Transparency = 0
local AddTeamColor = TeamColor:Clone()
AddTeamColor.Value = "Blue"
AddTeamColor.Parent = player
ReadyCount.Value = ReadyCount.Value + 1
end)
The lines that give the Value to the player are 14-16
Teleport Script [not the full script, only included the important parts]
while wait() do
if game.ServerStorage.ReadyCount.Value == 2 then
local players = game:GetService("Players")
for i, v in pairs(players:GetChildren()) do
local telePos
if v.TeamColor.Value == "Red" then
telePos = CFrame.new(14,2,-18)
elseif v.TeamColor.Value == "Blue" then
telePos = CFrame.new(14,2,13)
end
local char = v.Character
if char then
local humanoidRootPart = char.HumanoidRootPart
if humanoidRootPart then
humanoidRootPart.CFrame = telePos
end
end
end
end
end
The error occurs at line 7
All help is greatly appreciated, thank you :D

3 comments
Because you need to do Part.BrickColor = BrickColor.new("Really red") or Part.Color = Color3.fromRGB("255,0,0") I think?
What is the ClassName of the TeamColor object? Is it a Team instance or a BrickColorValue?
TeamColor is property of player, by using . you are going to index properties first, then children, you should rename the value or use :FindFirstChild("TeamColor").Value