How can I disable all frames out of view?

So I noticed that in Jailbreak, one of the devs (can’t remember atm) said that viewport frames that weren’t in view were disabled to save lag. i was wondering how I could do this because the viewport frames I use are a bit extreme for my current game.

3 Likes

I know on a ScreenGui, you can explicitly set ScreenGui.Enabled = false. For individual gui objects, on the other hand, you can probably set Frame.Visible = false. I have not tested to see if that reduces Roblox’s memory usage when the frame is set not to be visible, but I assume it would have an effect as the game engine is longer worried about rendering the frame.

I’d say that a bit of testing would need to be done to truly gain insight to the performance impact that these properties have on the game.

1 Like

I know it won’t be a huge lag fix but I was just trying to learn how to disable them when they were out of view.

1 Like

Yeah, I’m not aware of any specific methods to “disable” any UIs other than what I described above.

Like I said, some testing should be done to see what the best solution for this is.

Alright, I guess I’ll just play around for a bit and see what I can find.

1 Like