CoreGui.RobloxGui.Modules.Settings.Pages.Players:461: attempt to index nil with 'Destroy'

This error seem to be linked with the voice chat featured enabled and only occur on my old project (almost 2 years specifically) that I am continuing recently. I tried disabling related scripts that I made for voice chat but the error keeps recurring. It only stops whenever I disable the voice chat feature.

I tried putting all my scripts and other content in a newer place to make sure if the error only occurs in older projects, but the error keeps recurring. I did not use any free models and all my scripts are 100% made by me.

Not sure if its really caused by any of my scripts, its just annoying because Im fixing tons to my old project and sure many errors will occur but not something like this.

2 Likes

I looked into some Roblox code. This is just due to the muting feature I think? It tries to find a way to mute a player or something like that and it checks if there is at least 1 muting button if not found it destroys some frame and that might be a Voice Chat Frame or something of some kind? I’m not sure what it’s intended to do… I didn’t look too far.

1 Like

I’ve also encountered the same issue and took a look into why it’s causing this problem. It originates from the muteAllButtonRemove() function, likely during deinitialization of the UI. Not a big deal until it runs into updateButtonsLayout(), which, in this case, it follows the else statement of simply deleting a button frame (the frame that holds the buttons)

Now I am not 100% certain why it could be nil, unless it’s because updateButtonsLayout() was called twice, where the conditions for the primaryButtons table were 0, and therefore it had already deleted the buttonFrame, and now it’s trying again, which leads to the error shown where we are trying to a destroy something that doesn’t exist anymore

1 Like

That’s exactly what the code said I looked into it…

Edit: This might be a bug?

2 Likes