We’ve been stuck over this issue for a few hours. We are getting the expected output that suggests that the correct button assets in the PlayerGui are being loaded, but however, the events attached to the buttons are not working. Worse of all, this is extremely inconsistent, with one of us having the buttons fail to work every time, and with the rest of our team having about a 25% chance of the buttons breaking.
Things that we have tried (and failed):
Deleting every other UI asset besides the buttons
Moving the buttons to the root of the ScreenGUI they are contained in for testing purposes
Making sure that the buttons are set to Active
Changing the zIndex value of the buttons
Attempted to load the character manually after using LoadCharacter
for _, button in pairs(UI.Home.baseFrame:WaitForChild("MainMenuHolder"):GetChildren()) do
if button:IsA("TextButton") then
If you are running a team create did you commit the code? Are you sure you aren’t just missing the output? Are the buttons being removed at all or recreated? I just recreated this in a separate file and everything worked as expected. Is there a file you could upload? A few things could be causing this not to work.
Am I commiting the code?
It shouldn’t matter for Play Solo (it’s a part of the collaborative programming that you don’t have to apply to test your personal changes,) but yes, I did test with applying. 4 people have been going at this issue for around ~7 hours.
Missing the output?
No. Most definitely not.
Are the buttons being moved or recreated?
I attached a spawned function to print the full name of the buttons each second. They are not moving, or changing at all. They remain in the same place.
A few things could be causing this not to work:
We are honestly unsure why this isn’t working at this current time. Interestingly, it only fails to function 83% of the time. (estimate)
Again, the buttons are being found and are staying in the same position, but the events just refuse to work.
Yes. Interacting with the button entirely fails, even though the same buttons that are being connected in the loop are the ones receiving the events. We’re getting some output, but not the entire output.
The problem was due to how the had the UI parented. Apparently, whenever we had the UI parented to a ModuleScript at any point, the UI would refuse to work vehemently. We’ve literally done this exact same before and had it work 100% of the time totally fine. Thanks to @Brinker7 for helping us find this strange issue.