|
| 26 Dec 2015 11:32 PM |
| how can i make a level up system |
|
|
| Report Abuse |
|
|
|
| 26 Dec 2015 11:35 PM |
If xp >= xpNeeded then xp = xp - xpNeeded Level = Level + 1 end |
|
|
| Report Abuse |
|
|
|
| 26 Dec 2015 11:53 PM |
while wait() do local ExP = game.Players.LocalPlayer.leaderstats.Experience local ExPNeeded = 50 local Level = game.Players.LocalPlayer.leaderstats.Level if ExP.Value >= ExPNeeded then ExP.Value = ExP.Value - ExPNeeded ExPNeeded = ExPNeeded*2/.5 Level.Value = Level.Value + 1 end end |
|
|
| Report Abuse |
|
|
|
| 26 Dec 2015 11:56 PM |
| for the love of god do not use a loop that checks 30 times a second if the player has leveled up omfg |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2015 12:04 AM |
local ExP = game.Players.LocalPlayer.leaderstats.Experience ExP.Changed:connect(value) local Needed = 50 local Level = game.Players.LocalPlayer.leaderstats.Level if value >= Needed then Needed = Needed*2/.5 Level = Level + 1 value = value - Needed end end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Dec 2015 12:46 AM |
Use the xScale property expBar.Size = UDim2.new(playerExp/requiredExp,0,1,0) |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2015 12:52 AM |
| Put the check in the function you hopefully wrote for adding XP. |
|
|
| Report Abuse |
|
|