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:

```
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local level = Instance.new("IntValue", leaderstats)
level.Name = "Level"
level.Value = 1
local exp = Instance.new("IntValue", level)
exp.Name = "Current"
exp.Value = 0
local maxExp = Instance.new("IntValue", level)
maxExp.Name = "Max"
maxExp.Value = 100
-- continous loop
function additionXP()
player.leaderstats.Level.Current.Value = player.leaderstats.Level.Current.Value + 25
end
while true do
wait(30)
additionXP()
print("XP given!")
if exp.Value >= maxExp.Value then
level.Value = level.Value + 1
exp.Value = 0
maxExp.Value = maxExp.Value + 100
end
end
end)
```

Then here’s the LocalScript located in the StarterPlayerScripts:

```
local player = game:GetService("Players").LocalPlayer
local canChat = true
local coolDown = 10
player.Chatted:Connect(function(message)
if canChat then
canChat = false
coroutine.wrap(function()
wait(coolDown)
canChat = true
end)()
player.leaderstats.Level.Current.Value = player.leaderstats.Level.Current.Value + 5
end
end)
```