Why does this not work:
while itemName.Value ~= "none" do wait(.0001) print("item value is not none") gui.Visible = true gui.Position = UDim2.new(0, mouse.X, 0, mouse.Y) end
While this does:
while true do wait(.0001) if itemName.Value ~= "none" then gui.Visible = true gui.Position = UDim2.new(0, mouse.X, 0, mouse.Y) end end
The second script will keep looping regardless wether (itemName.Value ~= "None") results in true or false
Since the condition for the while loop will always be true
The first script however use (itemName.Value ~= "none") as its condition, which means once (itemName.Value ~= "none") resulted in false, the script will stop running