Hi, I’m making game and want to add Money value into it, but I wan’t to do it without any IntValues. But there’s an issue. Is it possible to make an TextLabel that will instantly updates to the money amount if the DataStore’s data was changed? Like on IntValue, you can just write .Changed:Connect(function() after it and it will do smth if it was updated.
If you don’t understand my question, sorry, I’m from UA, so I don’t know English language too much.
Why don’t you want to use IntValue
s? It’s gonna be incredibly hard to make a money system without them.
If you fire an event before saving the data that will update the label, yes.
Please, though, DO NOT update the value in the store every time the money is changed, and definitely do not spam check the store. It’s gonna slow down performance a ton you’ll have a really inefficient data system.
I know, but the only reason why I don’t want to use IntValue it’s: If player is online, and you will try to change he’s money DataStore, it will set to their IntValue’s value.
If you’re trying to overwrite the value in the DataStore
when saving money anyway, not using an IntValue
will make no difference.
You could try using UpdateAsync()
with some other comparison code as well some items in the player’s data when saving.