Instead of increasing the stamina by 10 every time, it increases by 10 the first time, then on the second it goes up by 30, then 70 and so on.
local Player = game.Players[script.Parent.Name]
repeat wait() until Player and Player:WaitForChild("Stamina") ~= nil
local MaxStamina = (100 + (1.5 * Player.Stats.Level.Value))
Player.Stamina.Changed:Connect(function()
while Player.Stamina.Value < MaxStamina do
wait(0.5)
Player.Stamina.Value = Player.Stamina.Value + (10)
if Player.Stamina.Value > MaxStamina then
wait(0.05)
Player.Stamina.Value = MaxStamina
end
end
end)
any better way of writing this? Or any suggestions on the problem?

2 comments
Mind if you can post the error & the error line?
there is no error .-.