Depends on what you want it to be, do you want the GUI to appear in a random pattern indefinitely, or after the other GUI appear nothing just happens?
I would assume it’s the second idea.
You should do this in a local script, which is awesome, no remote event involved!
You get the local player first
local Players = game:GetService("Players")
local player = Players.LocalPlayer
Now we can access PlayerGui!
Then we acquire the two Gui popups of yours! I recommend storing them in replicated storage as two separate ScreenGuis.
local PopUp1 = game.ReplicatedStorage.Popuphere
local PopUp2 = game.ReplicatedStorage.Popupheretoo
--just create a path to the popups
Now here’s the part where you put the Gui on the Player’s screen.
Create a local function
local function Appear(popup)
task.wait(480) --more awesome wait()
local clone = popup:Clone()
clone.Parent = player.PlayerGui
end
popup isn’t an actual object yet, but we can assign it by simply running the function!
Appear(PopUp1)
Now the “popup” object is the PopUp1 GUI!
Great now we made the FIRST pop up appear, what about the second one?
Well since it is a popup, I assume you already have a X button to close it. So you just create a path to it.
local debounce = false
local function Appear(popup)
task.wait(480) --more awesome wait()
local clone = popup:Clone()
clone.Parent = player.PlayerGui
local closebutton = popup:FindFirstChild("CloseButton") --name both the close buttons this
closebutton.Activated:Connect(function()
popup:Destroy() --destroy the current popup
if debounce == false then -- debounce so it doesn't appear again
debounce = true
Appear(PopUp2) --Run the function again, now with popup being PopUp2
end
end)
end
Add these into your script, since it’s a local script, the event should run just fine.
May not be very optimized but I hope this help!
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local PopUp1 = game.ReplicatedStorage.Popuphere
local PopUp2 = game.ReplicatedStorage.Popupheretoo
--just create a path to the popups
local debounce = false
local function Appear(popup)
task.wait(480) --more awesome wait()
local clone = popup:Clone()
clone.Parent = player.PlayerGui
local closebutton = popup:FindFirstChild("CloseButton") --name both the close buttons this
closebutton.Activated:Connect(function()
popup:Destroy() --destroy the current popup
if debounce == false then -- debounce so it doesn't appear again
debounce = true
Appear(PopUp2) --Run the function again, now with popup being PopUp2
end
end)
end
Appear(PopUp1)