I am getting a "Infinite yield" error on AirDropNoticeGui I do not understand why I can see it in PlayerGui. I have also tried it this way: Nam.PlayerGui.AirDropNoticeGui.Main.Visible = true Then I get an error saying it don't exist.
local plr = game:GetService("Players") for p, Nam in pairs(plr:GetChildren()) do Nam.PlayerGui:WaitForChild("AirDropNoticeGui").Main.Visible = true print("1st") wait(5) Nam.PlayerGui:WaitForChild("AirDropNoticeGui").Main.Visible = false print("2nd") break end wait(15,50) end
I see your issue here..
so what you're wanting is this
Server Script-- ``` local notifyEvent = Instance.new('RemoteEvent',game.ReplicatedStorage) notifyEvent.Name = 'notifyEvent
while wait(15,50) do notifyEvent:FireAllClients() end ```
Local Script -- ``` local Player = game:GetService('Players').LocalPlayer local PlayerGui = Player:WaitForChild('PlayerGui') local Adng = PlayerGui:WaitForChild('AirDropNoticeGui') local notifyEvent = game:GetService('ReplicatedStorage'):WaitForChild('notifyEvent')
notifyEvent.OnClientEvent:Connect(function() Adng.Main.Visible = true wait(5) Adng.Main.Visible = false end) ``` If you have any question Please feel free to ask!