Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to put a gui into all players?

How do you get all the players on the server, and insert a GUI into them all at the same time? My Gui is located at game.ReplicatedStorage.Notification

-- So you will need:
Storage = game:getservice("ReplicatedStorage")
Notif = Storage:waitforchild("Notification")

1 comment

0

Why don't you just put the GUI in startergui lmao

2 answers


local Storage = game:GetService("ReplicatedStorage")
local Notif = Storage:WaitForChild("Notification")


for i,v in pairs(game.Players:GetPlayers())do
  if v:FindFirstChild("PlayerGui") then
  Notif:Clone().Parent = v.PlayerGui
 end
end

Id recommend using a RemoteEvent and have a server script fire all clients. After that have a local script clone the gui into the PlayerGui on the client event. To me this would be more useful because you can make different nonfications and easily edit it so they are shown in those 2 scripts.

This discussion is preserved as it was. New answers, comments, and votes are closed.