of     1   

devKillua
#221025074Tuesday, July 11, 2017 2:42 AM GMT

So Im scripting a level system and Im a bit rusty after not scripting for a while by a while I mean A WHILE.... but anyways here is my script wait() local Player = game.Players.LocalPlayer while true do wait() local sec = (Player.Data.XP1.Value / 1000) if script.Parent.Size.X.Scale > 0.95 then while script.Parent.Size.X.Scale > 0.95 do wait(0.2) if sec >= 75 then sec = 75 Player.Data.XP2.Value = Player.Data.XP2.Value + 75 script.Parent.Size = script.Parent.Size + UDim2.new(0.01,0,0,0) Player.Data.XP1.Value = 0 end end end end what im basically trying to make it do is make the bar increase after he/she gets an increase on there XP value HELP ME SENPAI XOXO kawaiiiiiiiiiiii
devKillua
#221026842Tuesday, July 11, 2017 3:09 AM GMT

bump
devKillua
#221029860Tuesday, July 11, 2017 3:51 AM GMT

hey can someone help mang 10 people have seen this is it really that hard to le solve
chimmihc
#221030954Tuesday, July 11, 2017 4:07 AM GMT

Titles exist for a reason.
devKillua
#221032691Tuesday, July 11, 2017 4:33 AM GMT

yep its a legit thread
Inductive
#221032845Tuesday, July 11, 2017 4:36 AM GMT

Alright, as opposed to using an infinite loop, it would be better to use the .Changed function. For example Whatever.Value.Changed:connect(function() length = Whatever.Value * 5 --or whatever will work for you. end)
devKillua
#221035240Tuesday, July 11, 2017 5:15 AM GMT

i just use whatever makes the code work, im pretty sure my infinite loop isnt the problem bump?
McRocketNuggets
#221035855Tuesday, July 11, 2017 5:24 AM GMT

Is it in a local script?
nullfeels
#221042746Tuesday, July 11, 2017 7:29 AM GMT

Inductive speaks the truth!
PhantomVisual
#221042895Tuesday, July 11, 2017 7:31 AM GMT

Inductive speaks the truth! [2] Having too many loops can lag your game. Also, you have a while loop inside of a while loop..
devKillua
#221077408Tuesday, July 11, 2017 7:26 PM GMT

yeah its a local script and ill fix the infinite loops after i finish with the script my guys im just trying to make it work
devKillua
#221087140Tuesday, July 11, 2017 9:37 PM GMT

bump
deu
#221087459Tuesday, July 11, 2017 9:42 PM GMT

What Inductive said will work.
Script_Squidy
#221088928Tuesday, July 11, 2017 10:03 PM GMT

.Changed also lags, use :GetPropertyChangedSignal("Value")
devKillua
#221096937Tuesday, July 11, 2017 11:55 PM GMT

bump my dudes help me

    of     1