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

Part is not a valid member of Model, how to fix?

Asked by 5 years ago

well im beginner, i just learned LUA a bit i used this code

game.Workspace.Model.Part = Enum.Material.Grass

then this freaking error made me crazy Part is not a valid member of Model

0
This just means that Model has no child named Part? is this a local script or a server script? User#5423 17 — 5y
0
Maybe try game.Workspace.Model:WaitForChild("Part") as the part has not loaded yet? Rheines 661 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

The issue is that you are trying to set Model.Part as if it were a property. You need to access the Material property of the part.

game.Workspace.Model.Part.Material = Enum.Material.Grass
0
That would cause a different error. User#5423 17 — 5y
Ad

Answer this question