Two separate ScreenGuis not being able to be changed at the same time, even though they don't influence each other in any way

Hi,
I’m currently designing a GUI system for my game, and I’ve decided to split the individual GUIs into multiple different ScreenGuis to optimize performance. However, I’ve come across a weird bug where when one of the ScreenGuis is activated, the second one refuses to do so, and vice versa. Here are two videos demonstrating the bug:

Video 1 and its code:

for i,v in pairs (game:GetService("Players"):GetChildren()) do
	if workspace:FindFirstChild(v.Name) ~= nil then
		workspace:FindFirstChild(v.Name).Events.DisableAllGuis:FireClient(v) --ScreenGui event 1, this is the only ScreenGui that has its script fire, thus working						 
                workspace:FindFirstChild(v.Name).Events.IntroBlackoutEvent:FireClient(v) --Second ScreenGui group, this Gui doesn't activate at all
	end
end


Details of video 1: Black screen does not appear, “Beastiary” button disappears

Video 2 and its code:

for i,v in pairs (game:GetService("Players"):GetChildren()) do
	if workspace:FindFirstChild(v.Name) ~= nil then
		--workspace:FindFirstChild(v.Name).Events.DisableAllGuis:FireClient(v)
		workspace:FindFirstChild(v.Name).Events.IntroBlackoutEvent:FireClient(v)
	end
end


Details of video 2: Black screen appears, “Beastiary” button does not disappear

I’ve tried wrapping both event firing lines with a task.spawn(), but the result hasn’t changed, so if anyone knows why this is going or how it could be fixed, that’d be greatly appreciated.

By the way, the expectation is for both the black screen to appear and the beastiary button to disappear.

Well, I don’t know what happens on the client side, but if you disableAllGuis, it probably also disables the gui that contains the blackintro. so I think you should make an exception for that gui (which contains the black intro)

Oops, I didn’t think about that beforehand :confused: . Thanks for the solution!

1 Like

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