Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to displays a players points with Data Store?

Asked by 9 years ago
local IQS1 = game:GetService("DataStoreService"):GetDataStore("IQS")

GUI = script.Parent

while true do

game.Players.PlayerAdded:connect(function(player)
    local key = "user_" .. player.userId
    local connection = IQS1:OnUpdate("key", function(value)
    print("the key was changed to " .. value or 0) 
    GUI.Text = value or 0
    end)
end)
wait(.5)
end

Attempted to do so, displays nothing. I am using a TextLabel. Script is a child of TextLablel.

Answer this question