(goin to leave this here incase someone else is having the same problem. The level system works in game, but not in test mode. Seems like roblox updated something)
I was working on a new project and when I got to the level system I ran into a problem. I literally copy pasted the code from an old level system that I did (and i know 100% that this level system worked) and it wont work now. I am completely perplexed by this, I'm not getting any errors at all. Here is my code:
wait(1)
local Player = script.Parent.Parent
local Stats = Player.Stats
local XP = Stats.XP
local Level = Stats.Level
XP.Changed:Connect(function()
if XP.Value >= Level.Value * 20 then
Stats.XP.Value = 0
Player.Character.Humanoid.Health = Player.Character.Humanoid.MaxHealth
Stats.Level.Value = Stats.Level.Value + 1
Stats.StatPoints.Value = Stats.StatPoints.Value + 2
Player.Character.UpperTorso.LevelUp:Play()
local Particle = game.ReplicatedStorage.LevelParticle:Clone()
Particle.Parent = Player.Character.UpperTorso
Particle.delete.Disbled = false
end
end)
thanks for reading. Did roblox break something maybe?

2 comments
I even tested projects as far back as 2014 that use this system and they wont work
I had to click on Server view while testing. I don't really like this change but o well