Data store not working

So I have a data store should display when the player joins the game.

	local value = PointsDataStore:GetAsync(player.UserId)
	game.Players[player.Name].PlayerGui:WaitForChild("Sidebar").Frame.points.Text = value

The problem is, the GUI is not displaying the correct amount. It defaults to zero.

Because you aren’t setting the actual text to the value of the points. That’s just the users datastore you set as the value. You’d have to get the variable of points from the individual player and have that as the value. Gonna assume you want a text label that actively displays the users points.

So try this in a local script.

while wait() do
local Points = -- whereever you have the actual points variable stored in the datastore, assuming it's in leaderstats and whatnot
local Label = script.Parent
Label.Text = "Points:"..Points.Value