The player's level is suppose to increase by 1 when a certain amount of XP is hit. However this does not happen with Filtering Enabled. XP will raise but the player never levels, and the XP does not reset its value either.

First script is a normal script in starter pack

second script is a normal script in server script service.

(on the cut off parts, it says FireServer())

s = script.Parent p = s.Parent c = p.Character

p.Levelss.XP.Changed:connect(function()
    if p.Levelss.XP.Value >= p.Levelss.Level.Value * 20 then
game.ReplicatedStorage:WaitForChild("RemoteEvents"):WaitForChild("Level"):FireServer()  
    end
end)




c.Humanoid.MaxHealth = p.Levelss.Defense.Value * 10 + 100
c.Humanoid.Health = p.Levelss.Defense.Value * 10 + 100 

local Event = game.ReplicatedStorage:WaitForChild("RemoteEvents"):WaitForChild("Level")




local function Level(player)
        player.Levelss.XP.Value = 0
        player.Levelss.Level.Value = player.Levelss.Level.Value + 1
        player.Levelss.Defense.Value = player.Levelss.Defense.Value + 1
        player.Levelss.CombatDamage.Value = player.Levelss.CombatDamage.Value + 2
        player.Levelss.SkillDamage.Value = player.Levelss.SkillDamage.Value + 2
        player.Levelss.MaxStamina.Value = player.Levelss.MaxStamina.Value + 1
        player.Levelss.MaxEnergy.Value = player.Levelss.MaxEnergy.Value + 1

end


Event.OnServerEvent:Connect(Level)

2 comments

0

does this level system actually works?

0

ew.. someone with negative rep looking to take scripts off of SH..