Coding Roblox Games Made Easy: Create, Publish, and Monetize your games on Roblox, 2nd Edition by Brumbaugh Zander

Coding Roblox Games Made Easy: Create, Publish, and Monetize your games on Roblox, 2nd Edition by Brumbaugh Zander

Author:Brumbaugh, Zander [Brumbaugh, Zander]
Language: eng
Format: epub
Publisher: Packt Publishing
Published: 2022-06-06T00:00:00+00:00


Note that both the set() and increment() functions also update the corresponding stat in the leaderstats system to the new value:

dataMod.set = function (player, stat, value) local key = player.UserId sessionData[key][stat] = value local statVal = player.leaderstats:FindFirstChild(stat) if statVal then statVal.Value = value end end dataMod.increment = function (player, stat, value) local key = player.UserId sessionData[key][stat] += value local statVal = player.leaderstats:FindFirstChild(stat) if statVal then statVal.Value = dataMod.get(player, stat) end end dataMod.get = function (player, stat) local key = player.UserId return sessionData[key][stat] end



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.