I know very very little about scripting and I just have no clue how to do this.
Well first, you need to create a script that is parented to the TextButton. Then, you need to make your script look for the Part in workspace after it has been clicked so that it can change the Part's colour. For example, let's say that the Part is directly in workspace and is named "Hello" and you want to change its colour to Black, you would need to use this following code:
script.Parent.MouseButton1Click:connect(function() workspace:FindFirstChild("Hello").BrickColor = BrickColor.new("Black") end)
This would cause the colour of Hello to change to Black after the TextButton has been clicked.