My datastore2 isnt saving/loading

I am making an odometer that should save, but when I join back, it says 0 (the original value)!

local DataStore2 = require(1936396537)

game:GetService("Players").PlayerAdded:Connect(function(plr)
	local kilometre_ = "kilometre_"
	wait(2)
	local kilometreData = DataStore2(kilometre_, plr)

	
	local kilometre = game.Workspace["DAF XF"].Body.DashBoard.SurfaceGui.RPM.Odometer.Script.km.Value

	local success, errorMessage = pcall(function()
		kilometre = kilometreData:Get() or 0
		
	end)

	if success then
		print("Data successfully loaded")
		kilometre = kilometreData
		else
		print("There was an error loading the data: " .. errorMessage)
		plr:Kick("Couldnt load data. Initiating Client Kicking. Expierience Error Code: 0x1936396537f")
		end
		
end)

game.Workspace["DAF XF"].Body.DashBoard.SurfaceGui.RPM.Odometer.Script.km.Changed:Connect(function()
	wait(2)
	local plr = game.Players:FindFirstChildWhichIsA("Player")
	local kilometre_ = "kilometre_"
	if plr == nil then
	
	else
	local kilometreData = DataStore2(kilometre_, plr)
	local success, errorMessage = pcall(function()
		kilometreData:Set(game.Workspace["DAF XF"].Body.DashBoard.SurfaceGui.RPM.Odometer.Script.km.Value)
	end)

	if success then
		print("Data successfully saved")
	else
		plr.PlayerGui.UI.NotificationText.Text = "Data wasnt saved. Expierience Error Code: 0x1936396537b"
		end
		end
end)

Did you enable studio access to api services ?

Yes. Every datastore script I amde is working. Expect this one.

Have you checked for any errors ?

Yes, only printing of Data sucessfully saved and Data sucessfully loaded.

UPDATE: Added debug:


It can read the value good, but still when I join back in
image

If your’s is set up like mine, then it won’t save values that were changed on the client side. How are you changing the value here?

On server side using a script that changes the value every second.

UPDATE:
Just…
Snímka obrazovky 2023-11-14 212913
Snímka obrazovky 2023-11-14 212922