This is the code
script.Parent.MouseButton1Click:Connect(function(player)
local v1 = math.random(1, 255)
local v2 = math.random(1, 255)
local v3 = math.random(1, 255)
game.StarterPlayer.StarterCharacter["Top Hat"]BrickColor = Vector3.new(v1, v2, v3) --error
end)

3 comments
The code is a bit distorted but you get the idea
You forgot . after ['Top Hat'] as the other guy said, the error means that the debugger excepts you to call it like a function (with brackets) or set new value of it.
This question has been closed because you have not provided an explanation with your question. Just posting code is not enough information for us to know the context of your perception!