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

cant change material of objects with scripts?

Asked by 7 years ago

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.

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. hiimgoodpack 2009 — 7y

2 answers

Log in to vote
0
Answered by 7 years ago

for properties that are "dropdown lists" you use Enum

workspace.boron.BrickColor = BrickColor.new("Bright blue")
workspace.boron.Material = Enum.Material.Foil
0
thx redjacob02 20 — 7y
0
You dont have to use enums. hiimgoodpack 2009 — 7y
0
Just use workspace.boron.Material = "Foil" 4D_X 118 — 7y
Ad
Log in to vote
1
Answered by 7 years ago

Do this:

game.Workspace.boron.Material = "Foil"
0
that's the old way creeperhunter76 554 — 7y
0
It still works today. XxJRushxX 22 — 7y

Answer this question