Data Store Problem

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want my “Egg” Int Value to save. All my other 3 Number Values are saving perfectly fine. But my last one, Egg doesnt work for some reason

  2. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    The best I can do is explain what Egg does. Basicly when you open an egg your egg value will go up by +1 or +3. This gets added from other scripts.
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

-- function getMultiplier(Player, multiplier1)
 -- Multiplier1 or Multiplier2
 local Multi = 0
 for i,v in pairs(Player.Pets:GetChildren()) do
  if v.Equipped.Value == true then
   Multi = Multi + v[multiplier1].Value
  end
 end
 return Multi
end
local Event = Instance.new("RemoteEvent")
Event.Name = "ClickEvent"
Event.Parent = game:GetService("ReplicatedStorage")
local PlayerStatsDS = game:GetService("DataStoreService"):GetDataStore("Test621")

game.Players.PlayerAdded:Connect(function(NP)
	
	local Key = "PDS-".. NP.UserId
	
	local GetSave = PlayerStatsDS:GetAsync(Key)
	
	local PSF = Instance.new("Folder", NP)
	PSF.Name = "leaderstats"
	
	local StatsFolder = script.Stats
	
	for _, S in pairs(StatsFolder:GetChildren()) do
		local NS = Instance.new(S.ClassName, PSF)
		NS.Name = S.Name
		NS.Value = S.Value
	end
	
	if GetSave then
		for n, Stat in pairs(PSF:GetChildren()) do
			Stat.Value = GetSave[n]
		end
	else
		local STS = {}
		for _, Stat in pairs(StatsFolder:GetChildren()) do
			table.insert(STS, Stat.Value)
		end
		PlayerStatsDS:SetAsync(Key, STS)
	end
end)

game.Players.PlayerRemoving:connect(function(OP)
	
	local Key = "PDS-".. OP.UserId
	
	local StatsFolder = OP.leaderstats
	
	local STS = {}
	for _, Stat in pairs(StatsFolder:GetChildren()) do
		table.insert(STS, Stat.Value)
	end
	PlayerStatsDS:SetAsync(Key, STS)
end)

game:GetService("ReplicatedStorage"):WaitForChild("ClickEvent").OnServerEvent:Connect(function(plr)
    plr:WaitForChild("leaderstats"):FindFirstChild("Clicks").Value = plr:WaitForChild("leaderstats"):FindFirstChild("Clicks").Value + plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value * getMultiplier(plr, "Multiplier1") * 2
end)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

Would you please put some prints in the code and show us the output.

I can’t tell the issue in the code, but noticing that this uses many for loops, it may be hard to detect but maybe when the script is done getting the children and it returns nil it may have something to do with that.
Try adding another instance and see what will happen to the eggs then. Just to prove my theory. Then we can work our way down from there.