Project 387: Lemonade Tycoon

21. Create a function for earning money

Start a new function called something like "getmoney" or "earnmoney."

Starting point file for this challenge

Steps

1. Create a local function called "getmoney" above your "buystand" function

This local function needs to be written before your "buystand" function in the script - that's because "buystand" makes a reference to this new function. 

local function getmoney

2. Give it a parameter "player"

This parameter will make sure the money goes to the correct player. 

local function getmoney (player)

3. Hit return to create an "end" to your function

Anything written between "function" and "end" will be the instructions for "getmoney."