Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to put a gui into all players?

Asked by
ANE_bot 17
4 years ago

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")
0
Why don't you just put the GUI in startergui lmao VitroxVox 884 — 4y

2 answers

Log in to vote
0
Answered by
174gb 290 Moderation Voter
4 years ago
Edited 4 years ago

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
Ad
Log in to vote
0
Answered by 4 years ago

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.

Answer this question