of     1   

smunkey
#141769745Sunday, July 27, 2014 10:39 PM GMT

I have this localscript inside of a textlabel that will make the textlabel constantly show the value of '_G.lpc'(which starts as 50). if _G.lpc>1 then repeat until _G.lpc<=1 script.Parent.Text = _G.lpc wait = 1 end At line one it says that I can't compare numbers to a nil value in the output. AT first I tried moving the '_G.lpc = 50' line of code into this script, but I was greeted with a crashed studio when I tried to run it.
BothAngles
#141769857Sunday, July 27, 2014 10:41 PM GMT

Spawn(wait);if _G.lpc>1 then repeat until _G.lpc<=1 script.Parent.Text = _G.lpc wait = 1 end
UncleTaz
#141769925Sunday, July 27, 2014 10:41 PM GMT

Countdown?
smunkey
#141770334Sunday, July 27, 2014 10:45 PM GMT

It just crashed faster with that script :l It's not really countdown, it's sort of like an inventory that tells you how much of something you have.
smunkey
#141775899Sunday, July 27, 2014 11:41 PM GMT

bump
smunkey
#141778427Monday, July 28, 2014 12:08 AM GMT

After some testing I got the script to this while _G.lpc > 1 do script.parent.text =_G.lpc wait = .3 end However it says that I am trying to compare a number to a nil value in the first line, which is weird since there are no nils to my knowledge.
ehern11
#141778626Monday, July 28, 2014 12:10 AM GMT

smun, spawn(wait) makes it crash and that's all he added to your script
smunkey
#141778769Monday, July 28, 2014 12:12 AM GMT

I know, but I got it to the above script and now it says that _G.lpc (50) is nil, 50 is a lot more than zero
fret13103
#141778823Monday, July 28, 2014 12:12 AM GMT

while _G.lpc>1 do script.Parent.Text = _G.lpc wait(1) end
128GB
#141778839Monday, July 28, 2014 12:13 AM GMT

if _G.lpc>1 then repeat until _G.lpc<=1 That will crash because its running infinite code instantly It won't have time for _G.lpc to ever change
smunkey
#141778921Monday, July 28, 2014 12:13 AM GMT

128gb, i fixed that with the above script... like i said, now it is saying that 50 is a nil value
fret13103
#141778973Monday, July 28, 2014 12:14 AM GMT

First problem, wait is written like this wait(NUMBER) Second, you need to initiate _G.lpc you can't just call it without saying what it is. local _G.lpc = 50 while _G.lpc>1 do script.Parent.Text = _G.lpc wait(1) _G.lpc-1 end
128GB
#141779016Monday, July 28, 2014 12:14 AM GMT

'while _G.lpc > 1 do script.parent.text =_G.lpc wait = .3 end' There are no waits in this script
smunkey
#141779166Monday, July 28, 2014 12:16 AM GMT

_G.lpc is a global variable, however i didn't know you had to do that with the wait value.
smunkey
#141779690Monday, July 28, 2014 12:22 AM GMT

Okay, I fixed it.

    of     1