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

can I have help to change this part material?

Asked by 3 years ago

I have a script that changes the property's of a part but I'm trying to change the material but Roblox says unknown global 'BrickMaterial' can I have help here's my code to change the material MagicBrick.BrickMaterial = BrickMaterial.new ("Neon")

2 answers

Log in to vote
0
Answered by 3 years ago

change it to this and i think it'll work

MagicBrick.Material = Enum.Material.Neon
0
Thanks kurt_russ12345 0 — 3y
0
you're welcome! Quintizzle 6 — 3y
Ad
Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

just go to properties and click on material to change the material or if you want to do it in a code do

local MagicBrick = script.Parent

local MagicBrick is variable and a variable is a name for the thing you want to script. script.Parent is just the Parent of the script so you're making the name = to the part

 MagicBrick.Material = "Neon"

Material is a property in Properties that changes the Material and you making it = to Neon but you to add the Material name inside the " " because Material is a string Value

0
Thank you for teaching me how this works kurt_russ12345 0 — 3y

Answer this question