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?
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.
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.
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".
The problem is the spaces.. Lua doesn't really like spaces in it's names. Try renaming the part without spaces. You could name it Timb (All the 1st letters of each word)
Locked by Articulating
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?