Are you trying to get the child named Name of the NameTag in NameTag.Name? If so, I’d use FindFirstChild or rename the Name Instance to something else.
I don’t think thats the issue here. The error is that it’s trying to set the color to a string value when it can’t. The “Name” child of Nametag doesn’t have anything to do it.
Properties have a precedent over children and descendants, it’s trying to access the Name property of NameTag, because the child (Name) has the same name as the property. Strings have methods you can call on them such as sub and match, which is what the compiler thinks you’re trying to do.
If you want to get the child (Name) and change the TextColor3 of it, you have to either use FindFirstChild or change the name, as @Blockzez said
Correction - string only has the __index fallback for OP_GETTABLE; and this is a runtime error so it is in the VM and not the compiler.
But the OP is setting the table and not getting it. In OP’s case, because strings don’t have primitive set operation and the __newindex fallback, OP_SETTABLE resorts to erroring.