Theres this damn bug that makes it so even if u dont meet the exp requirements it always levels u up for no damn reason can u please help me? Script:
script.Parent.Died.Event:Connect(function() wait (0.5) for _, v in pairs(game.Players:GetChildren()) do local Multiplier = v.Multiplier if v.leaderstats.Exp.Value >= Multiplier.Value then script.LvlUpSound:Play() local Bill = game.ServerStorage.BillboardGui Bill.TextLabel.Text = "Level up" local ClonedBill = Bill:Clone() ClonedBill.TextLabel.Text = "Level up" ClonedBill.Parent = v.Character.Head v.leaderstats.Exp.Value = v.leaderstats.Exp.Value - Multiplier.Value v.leaderstats.Level.Value = v.leaderstats.Level.Value + 1 v.Multiplier.Value = v.Multiplier.Value * 1.25
DataStore script (If Useful)
local DataStore = game:GetService("DataStoreService") local ds8 = DataStore:GetDataStore("MultiSaveSystem") game.Players.PlayerAdded:connect(function(player) local Multiplier = Instance.new("NumberValue",player) Multiplier.Value = 20 Multiplier.Name = "Multiplier" wait (0.5) local Multi = player.Multiplier Multi.Value = ds8:GetAsync(player.UserId) or 0 ds8:SetAsync(player.UserId, Multi.Value) Multi.Changed:connect(function() ds8:SetAsync(player.UserId, Multi.Value) end) end) game.Players.PlayerRemoving:connect(function(player) ds8:SetAsync(player.UserId, player.Multiplier.Value) end)
Please help me figure out the problem this is very annoying