Still have questions? Join our Discord server and get real time help.
1

# How do I reference objects that have abnormal names? [closed]

I have a part in Workspace and the name is "This is my brick". Whenever I use the code:

Workspace.This is my brick.Transparency = 1


it gives me an error. How can I edit objects with spaces or other strange characters in the name?

### Locked by Articulating

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

5
Everesty 1016
6 years ago

There are a few methods of doing this.

The short way is to do something like this: game.Workspace["Object Name"].Transparency = 1. It's kinda like how a table works.

Another way is to use the FindFirstChild method.

-1

Here is the true thing to do

game.Workspace["This is my brick"].Transparency = 1


Please note: After workspace I did not put a dot.

-2
Mr1Vgy 30
6 years ago

I do this game.Workspace["This is my brick"].Transparency = 1

Use a specific name like "Brick". Or it might work by putting [""] around it, and it could be like this: game.Workspace.["This is my brick"].Transparency = 1 I don't know if it works, if it does, your problem is solved. If not, use a name like "Brick".