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

How would I use type a name with spaces in a function?

Asked by 6 years ago

So I have a part named "Evil Brick" I tried to delete it by typing "game.Workspace.Evil Brick:Destroy()" but it just said error. How would I type it into the function without changing the name of it?

0
You could also use :FindFirstChild("Evil Brick") or :WaitForChild("Evil Brick") theCJarmy7 1293 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago

You can use game.Workspace["Evil Brick"]:Destroy()

You can find more information by looking up how tables work

Ad

Answer this question