Error when switching to another tool when already has (custom hotbar)

Getting “Something unexpectedly tried to set the parent of MP5SD to Backpack while trying to set the parent of MP5SD. Current parent is Bulldo344.” while unequipping and swapping tools.

I found out, that the tool has to be in player’s Backpack, and it cannot be in ServerStorage or anything, so I parent that before it gets equipped, but unequipping, I’m checking that everytime I equip something.

(coded retracted by author)

That message happens when you try and reset a parent too quickly.

Add a task.wait()

If I do that, it will start unequipping and equipping tools, and start to glitch out.

External Media

The wait can be between calling functions that change the parent.

Do not add it to a for loop.

It still happens, maybe I’m doing it wrong? Could you provide a example of what you mean, maybe I’m not following what your saying?

What line of code is in the output window with the error message?

There’s no error messages, warnings, anything. It’s just unequipping and equipping repeatly, but it solves the problem I was first having.

Put a print statement at the start of the functions you think are causing the problem.

Watch the output and see if you can figure out which function is looping the equip/uneqip.

Its print statement should be repeating in the output window.

I added a debounce, and waited 2 seconds to turn the debounce off.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.