Script is disregarding current leaderstat value made by another LocalScript

So basically, I have a continuous loop giving a player 25 exp points every 30 seconds. I have another LocalScript embedded in the StarterPlayerScripts that has a function that fires whenever a player chats, which gives them 5 exp points. The points given by the LocalScript add on to the true Current exp value and correctly show up on the GUI. However, whenever the loop script fires, it simply adds onto itself, disregarding the new value given by the LocalScript.

For example, say I get 25 exp points from the loop script, then I chat and get another 5 exp points, I will then have 30 exp points. But the second time the loop script fires, instead of giving me a total 55 exp points, it gives me only 50 exp points (sorry if that was a bit confusing).

TL;DR: It doesn’t seem to recognize the points given by the LocalScript.

Here’s the main script with the continuous loop, located in the ServerScriptService:

	local leaderstats ="Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player
	local level ="IntValue", leaderstats)
	level.Name = "Level"
	level.Value = 1

	local exp ="IntValue", level)
	exp.Name = "Current"
	exp.Value = 0

	local maxExp ="IntValue", level)
	maxExp.Name = "Max"
	maxExp.Value = 100

	-- continous loop

	function additionXP()
		player.leaderstats.Level.Current.Value = player.leaderstats.Level.Current.Value + 25
	while true do
		print("XP given!")
		if exp.Value >= maxExp.Value then
			level.Value = level.Value + 1
			exp.Value = 0
			maxExp.Value = maxExp.Value + 100

Then here’s the LocalScript located in the StarterPlayerScripts:

local player = game:GetService("Players").LocalPlayer
local canChat = true
local coolDown = 10 

	if canChat then
		canChat = false 

			canChat = true 
		player.leaderstats.Level.Current.Value = player.leaderstats.Level.Current.Value + 5
player.leaderstats.Level.Current.Value = player.leaderstats.Level.Current.Value + 5

This property assignment won’t replicate to the server. You can read more about that here, note the exceptions heading.

In short, you can’t change leaderstats values from a LocalScript. Well you can, but the change only appears on the specific client that made the change.

With this script:

local player = game.Players.LocalPlayer
local leaderstats = player:WaitForChild("leaderstats")
while wait(1) do
	leaderstats.Cash.Value += 1

it will look like the palyer gets 1 cash every second. But if you inspect the IntValue object from a server context it will remain at 0. When testing in Studio you can change between a client and server context by clicking this button: