So I’m trying to make it so that whenever a player joins, the GUI stored inside of a folder in the script below (this script is inside of ServerScriptService and is a BaseScript) gets replicated and added to the client’s PlayerGui
. So far everything is working… except for the plr.CharacterAdded:Connect(function(char)
part of the script, it just won’t add the GUI to the client. No errors, it prints that the GUI does exist in PlayerGui
, but when I look in the explorer tab while testing and go to Players.ScriptedSuper.PlayerGui
, it’s not there… someone please help, thanks.
game.Players.PlayerAdded:Connect(function(plr)
local charCount = 0;
local c = script.ClientGUIs:WaitForChild("Core UI"):Clone()
c.Parent = plr.PlayerGui;
if plr:GetRankInGroup(8755895) >= 13 then
local clone = script["Admin Button"]:Clone()
clone.Parent = c.Container;
local clone2 = script["Panel"]:Clone()
clone2.Parent = c.Container;
end
plr.CharacterAdded:Connect(function(char)
print("a")
local d = script.ClientGUIs:WaitForChild("Core UI"):Clone()
d.Container.Visible = true;
d["Loading Screen"].Visible = false;
d["Main Menu"].Visible = false;
d.Parent = plr.PlayerGui;
print(d.Parent.Name)
print(d.Enabled)
if plr:GetRankInGroup(8755895) >= 13 then
local clone = script["Admin Button"]:Clone()
clone.Parent = d.Container;
local clone2 = script["Panel"]:Clone()
clone2.Parent = d.Container;
end
end)
end)