Local noise = math.noise(seed, x/70, z/70) * 50 Return Color3.new(rand:NextNumber(), rand:NextNumber(), ThirdGenerate = MaterialsįirstGenerate = Materials Local Materials = Enum.Material:GetEnumItems() What went wrong? local mat = math.random(1,2) Part.Material = RandomMaterial - Set the random material Local RandomMaterial = Materials - Select a random value inside the table Table.remove(Materials, table.find(Materials, material)) local Materials = Enum.Material:GetEnumItems() - Get a table of all the possible materialsĮ Į Į Į Į Į įor _, material in next, IgnoreMaterials do - Removing unnecessary materials Any ideas about the behavior?Īlternate solution, that ignores a set of “invalid” materials. For reference, check the link I’m skeptic about the other materials that is not applicable for BaseParts, because some of the materials belongs to terrain.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |