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

How would you define something that has spaces in it's name?

Asked by 10 years ago

EDIT - Question Resolved

3 answers

Log in to vote
2
Answered by
jav2612 180
10 years ago

Game.Workspace:FindFirstChild("Linked Sword") or Game.Workspace["Linked Sword"]

There are more ways but those are what I use.

1
Thanks. systematicaddict 295 — 10y
Ad
Log in to vote
1
Answered by 10 years ago

As simple as:

game.Workspace["Linked Sword"]
0
I hate indexing stuff like that... camelCase is more efficient IMO. OniiCh_n 410 — 10y
0
Huh? ZarsBranchkin 885 — 10y
Log in to vote
1
Answered by
OniiCh_n 410 Moderation Voter
10 years ago

Don't use spaces. It calls for messy indexing. Use camelCase or underscores instead.

Answer this question