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

How do I make a GUI go into every players inventory in the server?

Asked by 6 years ago

Alright so, I have a chatcommand-loaded GUI, which is stored in Server Storage.

How do I move the GUI to show in everybodys screens.

I've tried everything from;

local GUICLONE = game.ServerStorage.AerisLoadGui:Clone()
for _,v in pairs(game.Players:GetChildren()) do
    GUICLONE.Parent = v.PlayerGui
end

I also tried

local GUICLONE = game.ServerStorage.AerisLoadGui:Clone()
for ply in pairs(game.Players:GetPlayers()) do
    GUICLONE.Parent = ply.PlayerGui
end
0
Where's it run from? Local or ServerScript. AdministratorReece 193 — 6y
0
Local I think.. HydroDivinity 2 — 6y
0
Go do the quiz I made and tell me your answers https://pastebin.com/UZZsV8xZ hiimgoodpack 2009 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

you could either :FireAllClients() with a remoteevent or fix your for-loop up. this has to be in a regular server script because you're accessing ServerStorage and you're looping through all the players and modifying their PlayerGui

for _,player in pairs(game.Players:GetPlayers()) do -- use GetPlayers()
    local GUICLONE = game.ServerStorage.AerisLoadGui:Clone() -- you want to clone it for every player
    GUICLONE.Parent = player.PlayerGui
end
0
Also, tell him that since a person is perfectly capable of getting shown a GUI when they are not supposed to with a hack, you should put this in ReplicatedStorage. hiimgoodpack 2009 — 6y
Ad

Answer this question