Declared in another script:
_G.Stamina = 100
The script that uses it and says "comparing number to nil"
local SBar = script.Parent:WaitForChild("BackG"):WaitForChild("SBar") while _G.Stamina > 0 and wait(.1) do print "test" SBar:TweenSize(UDim2.new(0, _G.Stamina/100, 0, 1, 0), "Out", "Quint", .1, true) end while true and wait(.1) do wait(.1) local print = "s" end
Is this a bug or am I doing something wrong here?
This is just a bug you have to reset roblox studio and it will be working again.Your welcome.I will aresiate it if you submit this awnser as the oficial awnser
The variable had not been declared before it was called, not a bug.