Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

cant change material of objects with scripts?

i was reading and testing the wiki when i got to using Material property with scripts i did what it said and it does not change the material of my object this is what i have

workspace.boron.BrickColor=BrickColor.new("Bright blue")
	workspace.boron.Material=6

the value "6" in the wiki is foil when i tried it and clicked the play button my object stayed plastic how do i make it work?Thanks.

1 comment

0

I dont really like using numbers to change a value. I like using Enums, as if you read it, you would know what it is. Like, I dont know the value for 6.

2 answers

✓ Accepted answer

for properties that are "dropdown lists" you use Enum

workspace.boron.BrickColor = BrickColor.new("Bright blue")
workspace.boron.Material = Enum.Material.Foil

3 comments

0

thx

0

You dont have to use enums.

0

Just use workspace.boron.Material = "Foil"

This discussion is preserved as it was. New answers, comments, and votes are closed.