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

Can someone tell me what this string of code means and what the variables do?

Code:

local Money = Player:WaitForChild("leaderstats").Money

1 comment

0

"Player" is the player. :WaitForChild(object) is the function that make the script wait until the object exist. And the variable "Money" will return the money of the Player.

1 answer

✓ Accepted answer

It means thats money is equal to player.leaderstats.Money. For example, if you were to do

print(Player:WaitForChild("leaderstats").Money.Value)  
local Money = Player:WaitForChild("leaderstats").Money
print(Money.Value) 

The long string on the top is the same as the short one on the bottom, it prints out the value of "Money"

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