Calling a module more multiple times?
05 | local dataStoreService = game:GetService( "DataStoreService" ) |
06 | local playerDataStore = dataStoreService:GetDataStore( "PlayerDataStoreTest3" ) |
08 | function gold.awardGold(player, goldGiven) |
09 | if player and goldGiven then |
10 | local myData = playerDataStore:GetAsync(player.userId) or { } |
11 | playerData [ player.userId ] = myData |
13 | myData.gold = myData.gold + goldGiven |
14 | local goldValue = player.PlayerFolder:WaitForChild( "Gold" ) |
16 | goldValue.Value = myData.gold |
Here I have my module which gives gold to players, and it works, but I cant call it again. How do I call it multiple times?