Problems with updating data

I am having trouble updating a users shop data, the problem is that the following image is the before and after of whats returned in the UpdateAsync function. But once I load into the game

Purchasing a ability
image

Loading the shop
image

Code for updating the items:

module.updateItems = function(plr,name,id)
	if not name then
		warn("No name specified")
		return
	end
	
	if not id then
		warn("No ID specified")
	end
	
	warn(id)
	
	local success,err
	local attempt = 1
	
	repeat
		success,err = pcall(function()
			shop_data:UpdateAsync(plr.UserId,function(oldVal)
				warn(oldVal)
				if not oldVal then
					oldVal = {}
					oldVal[name] = table.clone(DATA[name])
					oldVal[name].items = {}
				end
				
				if not oldVal[name] then
					oldVal[name] = table.clone(DATA[name])
					oldVal[name].items = {}
				end
				oldVal[name].items[id] = table.clone(DATA[name].items[id])
				
				cache[plr.UserId] = oldVal

				warn(oldVal)
				warn(oldVal[name].items[id])

				return oldVal
			end)
		end)
		
		attempt += 1
		
		if not success then
			warn(err)
			task.wait(3)
		end
		
	until success or attempt == 5
	
	if success then
		print("Succesfully added",id,"to",name,"for",plr.UserId)
		
		return true
	else
		warn("Could not add the item.")
		return nil
	end
end

Did any of the 2 lines print ? I’m assuming that the script is not running, and this could be because you’re testing in the studio and running this function when you get PlayerRemoving or game:BindToClose() (which do not work well in the Studio). Try playing it on Roblox and see if the code works.

It did print, (limit eeeeeeee)

Did it print this ? Or the other one ?

Yes it printed that string, limit limit