How do I get the value the player set this in studio?
Interesting question. I’ve been digging a bit and haven’t been able to find a way to access that information. I assume you’re planning on using this in a plugin, but could I ask what specifically you want to use it for? You may need to use some other method if it’s not accessible information.
I am doing a plugin that allows players to set the brick color and material values of a part instantly through those defaults with a hotkey.
So you can use the Selection service to get a list of objects a studio user currently has selected. Unless someone is able to find a method of obtaining the currently selected color and material of the built-in plugin tools, then you may have to manage that information yourself. You implementation might look something like this:
local Selection = game:GetService("Selection")
function paintSelection(color, material)
for _, obj in pairs(Selection:Get()) do
if obj:IsA("BasePart") then --Ensures the 'obj' has a 'Color' and 'Material' property
obj.Color = color
obj.Material = material
end
end
end
That doesn’t answer my question. I already know how to do that, I just do not know how to retrieve the color and material available in that tool bar.