The GUI disappears at certain angles and when rotating the camera

Hi, I tried searching and found one post that looked similar to mine, but unfortunately it didn’t solve my problem. The person complained that the GUI was disappearing in the game, which they later explained was a memory leak in the script, which I also checked for myself, but the main problem is that this is a situation in the game, my situation can also be seen in the studio.

I have problems with the GUI as soon as a player or person in Roblox Studio turns to a certain angle, regardless of distance, and then the entire GUI disappears. So we can rule out an error in the scripts. It all looks like a Roblox rendering error. I need advice on how to solve this, or whether it is an error directly in the Roblox core. The GUI is important for my game, it’s almost everywhere and there’s a lot of it. The problem is that sometimes you can see it and sometimes you can’t, it flickers.

I’m happy to provide more information, just let me know. The problem has been going on for a few months now, and I was hoping that Roblox would fix it or that I would figure out how to fix it myself. It seems a little better now, as it’s not as aggressive, but I would still appreciate any advice and help.

Video

:warning: Other developers I know are experiencing the same issue on this particular map. At certain angles/camera rotations, the entire GUI simply disappears, and this can be seen both in Studio and in the game itself.

This affects:

  • Everything in StarterGui (not the elements from Roblox Core itself)
  • Everything in ScreenGui or BillboardGUI

Technical Info

  • OS: Windows 11
  • Roblox Studio Version: 0.689.0.6890855 (64bit)
  • Roblox Studio Channel: production
1 Like

Do you mind turning on the profiling panel for UI by pressing ctrl/cmd + f2 (ctrl/cmd + f2 + shift if in studio) and face a specific direction that GUI would disappear? Specifically we would like to check the UI Draw Item section as shown below,


If you see high numbers, that is normally due to you have a lot of hidden surfacegui in the direction you are facing and all of them gets submitted as the display range for surface gui is set to infinite. You probably want to try tuning the SurfaceGui | Documentation - Roblox Creator Hub so that it only gets submit when player gets closer.

im having the same issues in 2 games and its only the surfaceguis is my only issue and no other guis.

1 Like

Hi, I’ll definitely provide it. I also tried Max Distance and played around with it, but it didn’t help me, and I couldn’t do that for the GUI elements in StarterGUI that are still visible.

I understand that disappearing would be normal and I would ignore it, but when it disappears everywhere and at certain angles, both in Roblox Studio and in the game.

I had to ask because I really don’t know what to do. I would also expect problems with streaming distance, but I have it set to the default Roblox setting.

I can provide any other settings if necessary. In the video, you can see how all elements disappear, even the decal, even though I’m standing right next to the element. If it were at a distance, it would be fine, but up close, it really disrupts gameplay when the GUI flickers.

as you can see there are 80000+ glyphs rendering in this direction, meaning there are definitely much more than you see on the screen on this direction, most of time it would be the surface gui hidden somewhere with max distance set to infinite and they will keep submitting even they are not visible currently. I don’t see too much issue on the screengui usage showing in your video and I don’t think you would need to worry about that, but you probably need to change something in the place’s world space surface gui that contains text specifically.

GlyphCount

Yes, but I have no idea where to look and what to set. As I said, streaming in the workspace is set by default. I don’t understand why so many are rendered when there is a wall and there is no transparency part that would force the engine to render and display things that the player cannot currently see. I don’t know whether to set all the UI to a smaller distance, which might also fix the flashing UI, Decalu, TextLabel, etc., if you tell me what I should check and where I can look to find out what might be causing this, but I didn’t have this problem a few months ago and the content was similar. It’s possible that some updates could be causing problems with this rendering. I tried playing around with the max distance for UI types such as SurfaceGUI, etc., but that didn’t help and seemed to have no effect. When I turn on Wireframe mode, streaming through walls works fine, so I’m quite confused and don’t know what to check. I would appreciate some specific recommendations.

Thank you for reply.

If you could send me a place file that I could take a brief look on? Also could I double check if this report is sent from the same team? as I believe they are the same root cause.

Unfortunately, I can’t send a file that would simulate it well, and I can’t send the whole game either, but what you sent looks like the same problem. I would need to hear what the solution to their problem is; I believe it could help me too.

1 Like

As it appears you’re having the same issue I had (that @0xabcdef1234 tagged in their most recent post)

The fix was running this in the command line in studio:

for _, instance in pairs(game:GetDescendants()) do
	if instance:IsA("SurfaceGui") then
		instance.MaxDistance = 100
	end
end

SurfaceGuis by default have a very large max distance and while they are “not on the screen” because “they’re behind a wall” - that’s not really how rendering happens. Your computer will still render some things to a certain degree beyond a wall - and surfaceguis will still be populated so long as they are within their max distance.

If you use the above code, setting things to 100 and find some of your surfaceguis to be empty until you’re close enough - and you want them seen from further away, consider change that number to be slightly higher or setting the individual surfaceguis based on which ones need a higher threshold and which ones don’t!

3 Likes

I tried it before, but it didn’t work so well. I tried your code and it seems to help and fix all the problems, but I’ll take another look at it and try some steps to see if the problems go away completely.

The problem is probably that I use a lot of graphic elements and the Roblox engine can’t render them anymore, which would be great to optimize somehow or set up globally, similar to streaming objects, which hides objects that are not needed and thus saves memory. Thank you for your help.

I will try to find out if everything is working as it should and then mark the answer as correct. Thank you for now.

Minor issues:

It seems that screenGUI has been fixed, but sometimes when changing the FOV or rotating the view, I can see all the decals and texts, but the top bar and GUI disappear, while the Roblox core GUI remains. So, in some angles, the Player GUI still disappears, but game GUIs such as ScreenGUI seem to be working correctly now.

I used a script and also adjusted all ScreenGUIs to a better distance, and I hope that will help with the situation. Nevertheless, it doesn’t flicker excessively, but it can be strange sometimes. I would also like to fix that, but I’ll see after more testing.

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