Currently I’m working on a GUI that displays the Local Player’s username and Points Leaderstat value. When I change a leaderstat value via the console, the GUI TextLabel does not update. Does anyone know what is causing this issue and how it could be resolved?
The leaderboard: (After setting points value from 100 - 72495)
The GUI: (After setting points value from 100 - 72495)
The script: (Local Script within a TextLabel)
local pointsValue = player.leaderstats.Points.Value
script.Parent.Text = pointsValue.." Points"
Changed is for any property under an instance. Make sure it’s just the instance, not a property. If you want to monitor a specific property, I recommend: GetPropertyChangedSignal()
Example
Couldn’t you just do a while loop (with a wait) and change the text everytime it runs?
local pointsValue = player.leaderstats.Points.Value
while wait(1) do ——change wait to whatever you want.
script.Parent.Text = pointsValue.." Points"
end
Please let me know if my way of doing this is incorrect or using a bad practice.
Also are you changing the values on the client or server? If your doing it on the client, it’s not updating to the server, therefore the points won’t update as it reads what the server says it’s value is.