Someone please help

I’m making a game that gives you “Points” the longer you stay in it, but I keep getting flooded with, “Warning: Locale not found ‘’, reverting to ‘en-us’ instead.” and this is only ingame not studio.

this is the only code I have in serverscripservice:


	
> 	local DataStoreService = game:GetService("DataStoreService")
> 	local dataStore = DataStoreService:GetDataStore("LeaderstatDataStore")
> 
> 
> 
> 	local function saveData(player)
> 	
> 	local tableToSave = {}
> 
> 	for i,v in ipairs(player:WaitForChild("leaderstats", 5):GetChildren()) do
> 		table.insert(tableToSave, v.Value)
> 	end
> 	
> 	local success, erorrmessage = pcall(function()
> 		dataStore:SetAsync(player.UserId, tableToSave)
> 	end)
> 	
> 	
> 	
> 	
> end
> 	
> 	
> game.Players.PlayerAdded:Connect(function(plr)
> 	
> 	local l = Instance.new("Folder", plr) l.Name = "leaderstats" local p = Instance.new("NumberValue", l) p.Name = "Points" local s = Instance.new("NumberValue", l) s.Name = "Submits" 
> 	
> 	local data
> 
> 	local success, errormessage = pcall(function()
> 
> 		data = dataStore:GetAsync(plr.UserId)
> 
> 	end)
> 
> 	if success and data then
> 		
> 		p.Value = data[1]
> 		s.Value = data[2]
> 
> 	end	
> 	
> end)
> 
> game.Players.PlayerRemoving:Connect(function(plr)
> 	local success, erorrmessage = pcall(function()
> 		saveData(plr)
> 	end)
> 	
> 	if erorrmessage then
> 		-- webhook here
> 	end
> end)
> 
> game:BindToClose(function()
> 	for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
> 		local success, errormessage = pcall(function()
> 			saveData(player)
> 		end)
> 		
> 		if errormessage then
> 			-- webhook here
> 		end
> 		
> 	end
> end)
> 
> while task.wait(0.5) do
> 	repeat task.wait() until game:GetService("Players"):GetPlayers()
> 	for i,v in ipairs(game.Players:GetPlayers()) do
> 		v.leaderstats.Points.Value += 1
> 	end
> end
```

From my knowledge, this warning means that some localization for a text has not been found. Did you try to translate your game? Does the “Points” script work?

I guess the error is due to this line

local l = Instance.new("Folder", plr) l.Name = "leaderstats" local p = Instance.new("NumberValue", l) p.Name = "Points" local s = Instance.new("NumberValue", l) s.Name = "Submits"

The script works, it goes smoothly except for the “warnings” flooding and lagging my game

Can you send a SS of the output?

image

If you disable the script is the warning still popping up?

When I disable it its still popping up, it only shows up once I add something to a value; example:

leaderstats.Points.Value += 1
– error —

This is something completely unrelated to the script provided and has something to do with Localization. Not sure how this warning is triggered unless one of the many Instances with a LocaleId property of some type decided to suddenly mess up on your end.

It only shows up when I add a number to a value, I’m gonna try doing it on an alt account and see if it still works, by just transfering scripts and this UI I made