basically just trying to change the text in the text label with a variable. this is the error
attempt to index string with 'TextColor'
local color = character.UpperTorso.BrickColor TextLabel.Text.TextColor3 = color
Problem
You're attempting to index a string with a function, this would not work because functions cant be referenced by a string. - Unless with a type of function.
Another problem is that you cannot use BrickColors
with a text. Because a brickcolor is a property of a 3D dimensional object.
Solution:
You'd have to use this function to change textlable colors.
TextLable.TextColor3
.
Fixed script
local color = character.UpperTorso.Color3 TextLabel.TextColor3 = color
You can't mix BrickColor
and Color3
together, as it would break your script. Instead, get the Color3 values from the character and then use TextLabel.TextColor3
local color = character.UpperTorso.Color3 --This gets 3 values. TextLabel.TextColor3 = color