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

How do I fix this line?

Asked by 8 years ago
Edited 8 years ago
game.Lighting.[G] Frost:clone().Parent = player.Backpack

The "[G] Frost" will not go through, how do I make it so I can keep the name of the gear and have this line work?

Note: I do believe it might be that you can't have spaces or special characters in the <name>

2 answers

Log in to vote
1
Answered by 8 years ago
Edited 8 years ago

["[G] Frost"]

Using this allows for spaces in your items names. Not too sure about the square brackets tho

Ad
Log in to vote
0
Answered by
Hybric 271 Moderation Voter
8 years ago

As Kritik stated, you cannot space String Names onto Lua in that format. The correct code would be:

game.Lighting["[G] Frost"]:Clone().Parent = player.Backpack

Answer this question