Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to get the number of material? [Solved]

Asked by 7 years ago
Edited by M39a9am3R 7 years ago

This question has been solved by the original poster.

I need to get the number of material of a part, I run this code

print(game.Workspace.Part.Material)

and the output said Enum.Material.Plastic, all right, now I know the material is plastic, the number of the plastic material is 256, now my question is: how to get the number of the material? something like:

print(game.Workspace.Part.Material.Number) 
--output: 256

Any help will be appreciated

1 answer

Log in to vote
0
Answered by 7 years ago

I all ready find the information, just for the records, I am going to show the answer:

print(game.Workspace.Part.Material.Value) --output: 256
print(game.Workspace.Part.Material.Name) --output: Plastic
Ad

Answer this question