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

Can you change the material of parts using a script?

i want to use a script to change material of a gun model. i want to change the material of the whole gun with 1 script. can i do that? can i change material of a model?

1 answer

You can change the material of a part through the part's Material property:

game.Workspace.Part.Material="Neon"

If you want to be able to see all of the materials as you type it in, you can use Enum.Material:

game.Workspace.Part.Material=Enum.Material.Neon

You can read up more on enums and materials here and here.

2 comments

0

could yoou show me how would i use that?? i dont understand it. i tried puting that in but nothing happend

0

Well, unfortunately I can't really help you there, due to the fact I have no idea what the gun's design is.

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