Getting the Enum value

Simple question: How do you get the actual value from an Enum?

For example, you try to get the humanoid’s FloorMaterial, and you get this:

print(humanoid.FloorMaterial)
--Enum.Material.Plastic

However, how do I extract the important string “Plastic” out of that Enum?

Enum.Material.Plastic
--How do I get the string "Plastic" from that Enum?

If you have any suggestions or solutions, you can comment them down. Thank you.

you can print .Name with enums

--example
print(script.Parent.Material.Name) --would print the parts material name

You mean:

Enum.Material.Plastic.Name
-- "Plastic"

Can you be more specific?

1 Like

no

Enum.Material.Name --that wouldn't work i just found out

can you give more context? (me being stupid)

edit:
oh wait
my bad
i believe you can just do

print(humanoid.FloorMaterial.Name) --just tested it, it works