I’m making a game, and i want that when the player get some cash, a text will pop-up, showing how much he gained. In summary, i want to identify when a value changes, and how many “Cash” of difference. That’s possible? if it is then how i do this?
you can use the Instance GetPropertyChangedSignal()
for this to determine when something changes.
The way I see it, there are two ways to go about this:
-
Create a module that handles all of the value adjustments, so it’s the only thing directly changing the player’s cash value. Whenever the module is used to change the player’s cash, have it fire a remote to the client to show a GUI, passing through the amount.
-
(Assuming the cash value is accessible from the client) Define a variable to hold the player’s current cash value. Use
GetPropertyChangedSignal
to detect when the cash value changes, and find the difference between the new value and the old one saved in the variable. Show the GUI with the difference, and update the variable to hold the new value.