Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Having trouble making a Gui that constantly updates itself on how many points there are?

This script does work. However, when I buy something during the game, it doesnt update and its just the same number the whole time. Though, it does update the points after the game has been reloaded. (shutdown & rejoin server)

points = game:GetService("PointsService")
grant = game.Workspace:FindFirstChild("Grant", true)
gui = game.Workspace:FindFirstChild("IngamePoints", true)
awardablepoints = points:GetAwardablePoints()

repeat wait() until points

if points ~= nil then
	gui.Text = awardablepoints
end

1 answer

✓ Accepted answer

Points will be true when it is executed, so it will end. Try making the while go until something else?

2 comments

0

I tried a while loop but that didnt even work, it would still act the same.

1

Again, you are only calling it once. You would need something like while workspace do wait() if points ~= nil then gui.Text = awardablepoints end

This discussion is preserved as it was. New answers, comments, and votes are closed.