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

in a code i was following it had and under score after a word for example why do they do that?

game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local key = "player_".. player.UserId

1 answer

✓ Accepted answer

Your code is just building a String by concatenating ("combining") the left and right hand side of the "two dots operator" (..). The Lua Manual can help you with understanding it a bit more.

Basically, you want to brush up on your programming basics a bit more!

What you can do is try run this code and then check the Output tab, and maybe you get a better idea of it:

print("player_".. player.UserId)

Also note that you have not posted the entire code. The key ("player_".. player.UserId) is probably just a string that is used to store and identify some data associated with a given player in a table.

1 comment

0

thx]

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