of     1   

Jesseiesus
#138892902Tuesday, July 01, 2014 8:13 PM GMT

So I have this code here: local MaxExp = 2 local CurrentExp = script.Parent.Exp.Value local CurrentLevel = script.Parent.Level.Value local IncreaseIncrement = 0.15/MaxExp local ExpBarSize = CurrentExp*IncreaseIncrement function CheckStats() while true do wait(.1) if CurrentExp==MaxExp then CurrentLevel = CurrentLevel + 1 MaxExp = MaxExp + 2 CurrentExp = 0 script.Parent.ExperienceAmount:TweenSize(UDim2.new(0, 0, 0.025, 0), "In", "Quad", .1, false, nil) end script.Parent.LevelText.Text = ("Level "..CurrentLevel) script.Parent.ExperienceText.Text = (CurrentExp.."/"..MaxExp) script.Parent.ExperienceAmount:TweenSize(UDim2.new(ExpBarSize, 0, 0.025, 0), "Out", "Quad", .5, false, nil) end end CheckStats() Basically, all I wanted to do was create a simple exp bar script, but I ended up spending way too much time just trying to figure out why this won't work. The problem is that Roblox Studio seems to think that nothing is wrong, and I can't see what is wrong either. However, once, I tried putting all of the variables into the while loop, and it worked, but the level number wouldn't go up and was kind of flickering, and the exp wouldn't reset to 0. I tried to expand on that, but I couldn't get anywhere besides back to where I started. I am just so lost on this right now, and I would really love some help please :)
Jesseiesus
#138978652Wednesday, July 02, 2014 2:22 PM GMT

Okay, so I decided to go back to it today, and after about an hour of scouring the wiki, I finally got some stuff to start working. Now, everything is finally working like I planned it to. Send me a PM if you want the code.

    of     1