I did this really simple script that gets all the players and places the script's parent inside the players own PlayerGui, but nothing is happening. The output is not speaking and I've tried using wait() because I thought the script probably was executing before any players joined the game. Heres the script:
local Players = game:GetService("Players")
local pc = Players:GetPlayers()
for i,v in pairs(pc)do
script.Parent.Parent:Clone().Parent = v.PlayerGui
end

7 comments
is this a server script?
Its inside a GUI.
And its a script, not a localscript.
I thought gui's were automatically given to players when GUI's are placed in StarterGui
What I was trying to say is that I want to give the GUI to all the players without using StarterGui.
use :GetPlayers() instead of GetChildren() but maybe u should try like a 5 seconds wait to see if the script is executing before a player joins
scrpt.Parent.Parent:Clone().Parent = v.PlayerGui