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

How do I get every player's playergui?

I've been starting to script in FE but I don't know how to get every player's playergui. It's for a function that closes a Gui using a remote (so it works with FE)

script:

function exit(visible)

game.ReplicatedStorage.HideShop1GUI:FireClient(visible)	

end

game.Players:GetPlayers():WaitForChild("TryItStoreGUI").Exit.MouseButton1Down:connect(exit)

^^^^^ I've tried it but it was just a guess I really don't know.

I'm new to this website so Idk how to format my stuff.

1 answer

You don’t need to get all the player’s Gui nor do you need to use a remote event. Put this following code under a LocalScript, inside a TextButton inside a ScreenGui, with your Frame inside the same ScreenGui, but the TextButton not inside the Frame.

script.Parent.MouseButton1Click:Connect(function()
    local frame = script.Parent.Parent.Frame
    frame.Visible = not frame.Visible
end)

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