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

How to write an identifier with spaces?

Asked by 8 years ago

I am trying to identify a tool in a script so that it would clone the tool from Replicated Storage and into the player backpack only I cannot identify the tool if the name has spaces in it. It of course works fine without the spaced name, but I wanted to know if it were possible to identify the tool if it had spaces in its name. Help?

Tool=game.ReplicatedStorage.GuavaIceTea -- Is it possible to still identify this tool if it were named Guava Ice Tea?

1 answer

Log in to vote
0
Answered by
xAtom_ik 574 Moderation Voter
8 years ago

It is possible. I'd do it like this:

Tool=game.ReplicatedStorage["Guava Ice Tea"]

Easy enough, you could do

Tool=game.ReplicatedStorage:FindFirstChild("Guava Ice Tea")
0
Thanks so much! :D Brisingr360 45 — 8y
Ad

Answer this question