local plyrxpNeeded = ((plyrLevel.Value^2)*5)
local overdrawnXP = plyrXP.Value - plyrxpNeeded
for _, statButton in pairs(LvlUpGui:GetDescendants()) do
if statButton:IsA("TextButton") then
statButton.MouseButton1Down:Connect(function()
plyrAtr[statButton.Name].Value = plyrAtr[statButton.Name].Value + 5
plyrLevel.Value = plyrLevel.Value + 1
plyrXP.Value = overdrawnXP
LvlUpGui.GuiFrame.Visible = false
end)
end
end
while wait() do
plyrxpNeeded = ((plyrLevel.Value^2)*5)
if plyrXP.Value >= plyrxpNeeded then
overdrawnXP = plyrXP.Value - plyrxpNeeded
LvlUpGui.GuiFrame.Visible = true
end
end
So visually when I check the XP value inside the explorer, it does successfully reset my XP to the overdrawnXP value, but after I gain XP again it resets it back to whatever the value was before. I was told this has something to do with filteringenabled but is there a way to get around this issue?

3 comments
Well, you'll have to use RemoteEvents to send data from the client to the server and change the values on the server for it to take effect. https://scriptinghelpers.org/questions/94651/can-someone-help-me-understand-remote-events-they-dont-work-for-me#87427
Hey, I read through your post and generally understand how to use RemoteEvents due to your description, but how do I add multiple arguments? I tried RE.XPReset:FireServer(player, overdrawnXP) in my LocalScript and RE.XPReset.OnServerEvent:Connect(function(player, num) in my ServerScriptService script but it sees num as being my player instead
Nevermind, I don't have to add player in the FireServer lol thanks man