#Why is it still picking up the item?

1 messages · Page 1 of 1 (latest)

iron sparrow
#

why is it still picking up the item while also giving the "you can only have one item" pop up, please help me understand cus i dont know what the heck this iscrying

tribal pilot
#

because you arent stopping more tools from coming

left locust
#

i dont see anything dealing with the actual item pickup in the code you show, maybe it's coming from somewhere else.

#

also that while loop is horrible, every time you press e on anything, you spawn a new copy of that loop.

#

also i suspect you aren't overriding the default tool behavior where walking into a tool will pick it up, so it's almost guaranteed you have different code at play here

iron sparrow
#

The tools don't get picked up by walking into them

#

@left locust

iron sparrow
left locust
iron sparrow
iron sparrow
left locust
left locust
iron sparrow
iron sparrow
left locust
#

is that what that is doing? jeez, that's rough

iron sparrow
left locust
#

you change the value of currentTool without any checks

#

put it in the if block

left locust
iron sparrow
#

instead of being disrespectful could you actually help me out?

left locust
#

when you change that variable it'll get picked up in that loop where you compare every tool in workspace.tools against it, so when you change it, it's like equipping the new tool

#

the incorrect indentation in your code and the giant red boxes is really throwing me off

#

so yea anyway no disrespect intended but if that's how you feel then good luck sir salute

iron sparrow