Hello everyone,
I’m making a paycheck system into my game and need to pay players (increase their DataStore coins) when the game closes. I got analytics code from the Roblox website, but I don’t know what I should write instead of the player because I only got their UserId. Players:GetPlayerByUserId(UserId) does not return the player when the player is offline and wants a specific player type.
My paycheck system works like this: Every x minutes give all players a paycheck.
AnalyticsService:LogEconomyEvent(
???, --The player goes here, but I've got no player
Enum.AnalyticsEconomyFlowType.Source,
"Coins", -- Currency name
Paycheck, -- Amount earned
PlayerCoins, -- Current balance
Enum.AnalyticsEconomyTransactionType.Gameplay.Name, -- Transaction type
job -- Name of the job
)
Also, would you explain what other types of Enum Analytics Economy Transaction Gameplay do? There’s Value, Name and EnumType. I couldn’t find anything about it.
Thank you.