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.