So I am trying to work on my script and it says “attempt to compare number < nil”. Do you mind helping? (Sorry, I am terrible at explaining things ).
"Main.Frame.Confirm.MouseButton1Click:Connect(function()
if _G.PlayerData.Candy > 100 then
game.ReplicatedStorage.HW2022.BuyBox:FireServer(tonumber(100))
GameFrame.Shop.Visible = false;
Main.Visible = false
_G.Process(“Unboxing”);
local StartTime = time();
local OpenedItem = game.ReplicatedStorage.Remotes.Shop.OpenCrate:InvokeServer("HalloweenBox");
wait( 0.75-(time()-StartTime));
--InventoryFrame.Overlay.Visible = false;
if OpenedItem then
OpenCrate("HalloweenBox",OpenedItem);
end;
else
Main.Visible = false
_G.GetCredits()
end
end)"