Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is there a difference between 'Name' and ("Name")?

Like when doing :FindFirstChild("Part") or :FindFirstChild'Part' .

Is one of them deprecating?

3 comments

0

No

0

No

0

The FindFirstChild”Part” is faster, and if you’re not going to use the FindFirstChild second argument, I recommend not including the brackets.

1 answer

If you're calling a function and passing one table literal or string literal, you can omit the brackets.

foo "bar"
foo {"bar"}

is syntactic sugar for

foo("bar")
foo({"bar"})

Both function calls are exactly the same, it's subjective and neither option provides a performance increase.

2 comments

0

I never knew you could do that with tables. I knew with strings, like print”Hello world” is acceptable but i never knew you could do it with tables too.

0

which moron downvoted my answer

This discussion is preserved as it was. New answers, comments, and votes are closed.