I am trying to make a plugin but it gives an error that says: "Mat" is not a valid Enum material. I have tried parentheses and quotations, parentheses, and quotations. This is the code
local plugin = PluginManager():CreatePlugin()
local toolbar = plugin:CreateToolbar("Filling tools")
local button = toolbar:CreateButton(
"",
"Flood fill",
"Potato.png"
)
Fillblock=""
active = 0
--____________________________________________
_G.Changeblock = function(Mat)
Fillblock = Enum.Material.Mat
end
--____________________________________________
button.Click:connect(function()
if active == 0 then
plugin:Activate(true)
active = 1
print("Welcome to Warman13579's Fill plugin! Type in _G.help() to see the commands")
wait(1)
print("Select your material! The list of current materials is: Slate, Brick, WoodPlanks, Sand, Water, and concrete. Type _G.Changeblock(water) (water in quotations) for example.")
else
active = 0
plugin:Activate(false)
print("Goodbye")
end
end)
--_____________________________________________
NOTE: Some functions are not implemented like _G.Help()

1 comment
function x(y) print(Enum.Material[y]) end x('Grass') -->Enum.Material.Grass.