I want to get the stat return value in real time and do some monitoring. Does anyone have the same problem and have a solution?
Not entirely sure how you have it setup. If you’re the client, usually its the server that has the stat value so if you try to view it client side it just comes back empty or 0. If you make that stat value ‘Replicated’ then the server will always send the live value over to the client. I believe it goes something like that.
I had the same sort of problem when i was trying to set a stats window and it wasnt updating the stat correctly when i would equip/unequip a certain item. I had to either manually pass the stat update over to the client from the server side when the logic was called or i would have to set the value as replicated. For me there is a lag time when the stat is updated (like 1 second or so) and i hated the lag time as i like it going instantly so i ended up sending it over to client manually rather than use a replicated value. Replicated value is much easier to use though and is foolproof.
For easiest and fastest results, try clicking on your stat and changing its replication to ‘Replicated’. Then you can call that variable whereever you want to see that its changing, IF you’re changing it somewhere else.