Okay so hey, let me explain. I have a TextBox And this TextBox Players can enter a Material type. If the Material type is equal to for example “Plastic” then it will change to Plastic Example :
if Mats.TextBox.Text == nil then
print("Material is Nil")
else
NewPart.Material = Enum.Material.Mats.TextBox.Text
end