Started by
DerpyOreo
on
Topic category: Help with MCreator software
In my mod, I'm making an item where if its in your inventory, it gives you speed, but if its not in your inventory it doesnt.
I did this
The game crashes when I put the item in my inventory.
Help!
(also if you dont have a secure connection, thats my bad because im using my website for the image LOL)
Edited by DerpyOreo on Thu, 08/13/2020 - 15:21
So I tried what you have and it crashed, switched it to an if do statement and it worked. Don't forget the on player tick update trigger.
Generally don't use while() statements in a procedure that runs every frame if you can use an if() statement instead.
Your while loop locks the game from doing anything else, but checking for inventory item so it lags, freezes, and crashes