While testing my game, I noticed that a user called chameleongirl, whom I have no idea about is also in the leaderboard. Just to confirm, is there a vanruability in my script that causes the error?
local DataStoreService = game:GetService("DataStoreService")
local OrderedPlayerScore = DataStoreService:GetOrderedDataStore("OrderedPlayerScore")
local PlayerDataFol = game.ReplicatedStorage.PlayerData
function FilterODSK(key)
return string.sub(key,2,#key)
end
function SyncLeaderB()
local Data = OrderedPlayerScore:GetSortedAsync(false,10,0,math.huge)
local CurPage = Data:GetCurrentPage()
for rank, inf in pairs(CurPage) do
local Username = game.Players:GetNameFromUserIdAsync(FilterODSK(inf.key))
local Score = inf.value
local isOnLB = false
for i, v in pairs(game.Workspace.ScoreLB.LBgui.CoreFrame.BaseFrame:GetChildren()) do
if v.NameF.Text == Username then
isOnLB = true
break
end
end
if isOnLB == false and Score then
local NFrame = game.ServerStorage.Storage.GUI.PointFrame:Clone()
NFrame.Parent = game.Workspace.ScoreLB.LBgui.CoreFrame.BaseFrame
NFrame.Position = UDim2.fromScale(0,(0.9*(rank/10)))
NFrame.CountF.Text = Score
NFrame.NameF.Text = Username
elseif isOnLB == false and not Score then
warn("Score is missing")
end
end
end
function SaveScore()
local suc, err = pcall(function()
for _, v in pairs(PlayerDataFol:GetChildren()) do
local Score = v["Score"].Value
OrderedPlayerScore:SetAsync("s"..v.Name,Score)
end
end)
if suc then game.Workspace.ScoreLB.LBgui.CoreFrame.BaseFrame:ClearAllChildren() end
end
while true do
SaveScore()
local suc, err = pcall(SyncLeaderB)
if not suc then warn(err) end
task.wait(35)
end
```.0
And it is not a one-time error, I restarted the game many times and that user was still on there.
Doing some extra research, the user seems like an ordinary roblox user. Here is their profile:
I did some reasearch, and ur filterOSDK function is causing it. It somehow is deleting the first 2 numbers from ur userID, whichthen converts it into chameleongirls userID.
Your UserID = 407478547
Chameleon’s id = 7478547