Hello, I recently created a script in a tool that identifies the BrickColor of a certain part and prints it in the output, however, I don't know how to put it in the text label so that it displays it in a Gui. I'm sorry for bad grammar, im not a fluent english speaker.
Here is the script i am currently working with:
local g
script.Parent.Equipped:connect(function(mouse)
g = script.ToolGui2:Clone()
g.Parent = game:GetService("Players").LocalPlayer.PlayerGui
g.Frame.Frame.TextLabel.Text = ""
mouse.Move:connect(function()
local targ = mouse.Target
if targ then
g.Frame.Frame.TextLabel.Text = "[Insert BrickColor here]"
print(targ.BrickColor)
end
end)
end)
script.Parent.Unequipped:connect(function()
if g then g:Destroy() end
end)

2 comments
Were it says g.Frame.Frame.TextLabel.Text = "[Insert BrickColor here]" change the [Insert BrickColor here] to targ.BrickColor
Well it changes the text into targ.BrickColor but not the BrickColor of the part itself