Hello, I am currently creating a Raise a Floppa type game. One thing unique about raise a floppa is that the currency balance is global, meaning if one earns money, the money will be added to the server balance, if one spends money, the money will be removed from server balance.
I know how to create a currency system but not this kind of global-server type currency system. How can I achieve this? Please help me.
is it like for all players currency? if so, you can try to add NumberValue to ReplicatedStorage and make a script in ServerScriptService that references the NumberValue on the Server.
You’ll have to add a RemoteEvent to ReplicatedStorage.
Then the rest of the script goes inside either StarterGUI or StarterPlayerScripts that will FireEvent whenever a person earns money.
Hey, I think i found out how it would work. Thanks to your post.
By the way, is it save to store NumberValues inside of ServerStorage? I’d figure I will just store the money data in ServerStorage. And if this person clicks the money GUI. It sends a remote event to the server adding +1 or whatever amount of money that person got.
basically, whenever the person clicks a GUI on their client, it will fire a event to server side script that will constantly change the value of the NumberValue.
if you want to achieve something as money deduction whenever someone buys globally, you can try the same process, if its gui on their client side, same process will either be used. You’ll just have to add different States and etc to know whether the person Earned money or Bought something.
however if Server-side script could not find the NumberValue in ServerStorage as per referencing it on the script, you can try to put it on ReplicatedStorage and see if it would work, vice versa.
What about making a specific alt account or such that you make a leaderstats with? It could pose as the global value of money. Then you just have it so it adds the money to the alt account, and along with that you can record how much the person has given the server. I dunno, hope this idea is some worth to ya!
TLDR: Alt account holds the global money currency using leaderstats or whatever ya want, players click their money GUI, gives alt account money, script it so that the player can know how much they have made or given the alt account.
Using this way, you only mess with scripting leaderstats, then you can work on other mechanics of your game and could make up an improved version later on!
Yes alternate account. I’d assume you’d want to play your own game on your main account, and make sure to secure it with 2 step verification. So I suggest making an alternate account, then pretty much make your global currency all off the account. This is a decent very basic way of doin this for time being.