Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Inventory slot trying to find another when full?

Anyone could help me figure this out? this is for when i pick up an item it goes in my inventory but now if my inventory is full (there is 12 slots) it will try looking for the 13th slot and create an error, how could i make it detect that "i" is higher than 12?

if invslot["Slot"..i] == "Slot13" then
etc
end

1 answer

✓ Accepted answer

simpfuly do

if i > 12 then
	break
end

This will check if i is greater then 12, if so, it will end the current loop. (Thus, break).

1 comment

0

thanks! sometimes i feel like i don't even think -.- xD

This discussion is preserved as it was. New answers, comments, and votes are closed.