I was practicing my scripts and I always wondered why selection parts would not show when I inserted them into a part. Finally, I think I found the answer. YOU HAVE TO CHANGE THE ADORNEE TO THE PARTS NAME. So I did in the command bar the following:
game.Workspace.Part.SurfaceSelection.Adornee = "Part"
but then, it said in the output:
> game.Workspace.Part.SurfaceSelection.Adornee = ("Part") 13:57:04.882 - game.Workspace.Part.SurfaceSelection.Adornee = ("Part"):1: bad argument #3 to 'Adornee' (Object expected, got string) 13:57:04.883 - Script 'game.Workspace.Part.SurfaceSelection.Adornee = ("Part")', Line 1 13:57:04.885 - Stack End
how do I edit object values??!! thanks for reading!
The Adornee
property is a reference to a particular object.
"Part"
isn't specific enough -- there could be lots of objects named "Part"
.
Example:
obj.Adornee = workspace.Part
The same sort of expression that you could edit properties of, e.g.,
mypart = game.Workspace.Brick mypart.Transparency = 0.5
should be what you use as Object values:
something.Adornee = game.Workspace.Brick something.Adornee.Transparency = 0.5