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

My Script wont work with filtering enabled?

Asked by 7 years ago

this script works find without filtering enable but i need that on, this script is to save leaderstats i need help please.

01function onPlayerEntered(player)
02wait()--
03player:WaitForDataReady()
04repeat wait() until player:FindFirstChild("leaderstats")
05if player.DataReady then
06if player:findFirstChild("leaderstats") then
07local score = player.leaderstats:GetChildren()
08for i = 1,#score do
09local ScoreLoaded = player:LoadNumber(score[i].Name)
10wait()
11if ScoreLoaded ~= 0 then
12score[i].Value = ScoreLoaded
13end
14end
15end
View all 29 lines...

1 answer

Log in to vote
0
Answered by 7 years ago

The method ':SaveNumber' is deprecated, you're going to have to use 'DataStoreService'.

Ad

Answer this question