game.Players.PlayerAdded:connect(function(player) while wait() do local level = player:WaitForChild("leaderstats"):WaitForChild("Level") local exp = player:FindFirstChild("leaderstats"):FindFirstChild("Exp") local extraLevel = level.Value local expNeeded = ((extraLevel * 2) - 1) * 300 if level.Value < maxLevel then if exp.Value >= expNeeded then player.Cash.Value = player.Cash.Value + 50 level.Value = level.Value + 1 exp.Value = exp.Value - expNeeded levelupframe:TweenPosition(UDim2.new(0.5, -150, 0.5, -50), "Out", "Quad", 1, false) leveluptext.Text = "You have leveled up to Level: " .. level.Value player.Cash.Value = player.Cash.Value + 50 levelupframe:TweenPosition(UDim2.new(0, -300, 0.5, -50), "Out", "Quad", 1, false) end end end end)
I have this that levels the player up when they get enough exp. But the gui that should show up stays in the center of the screen. Please help.