✓ Accepted answer
I think your hierarchy must be mixed up. Are you using a local script? Will this be for all players or just a few?
If it is for all players, just use a normal script, cycle through the players and change the frames to visible.
If its only for select players, use a local script and change it for those selected members within there.
**Hierarchy:**I wouldn't access the gui by doing script.Parent.Parent.Parent ect., instead, find out where the gui is from game.Players.LocalPlayer and access it that way.
Note... If your gui is in StarterGui then is will be stored under game.Players.PlayerGui exactly as it is under StarterGui
for _, player in ipairs(game.Players:GetChildren()) do
frames = player.PlayerGui.PathToFrameFolderHere:GetChildren();
for i = 1, #frames do
frames[i].Visibility = true;
end;
end;
condition = true;
if(condition) then
frames = game.Players.LocalPlayer.PlayerGui.PathToFrameFolderHere:GetChildren;
for i = 1, #frames do
frames[i].Visibility = true;
end;
end;
2 comments
Even when changing line 3 to player.PlayerGui.allinfo.Visible = false and locating the player at the top of the code it still won't work. The errors is "allinfo is not a valid member of PlayerGui".
While FE is enabled, scripts can't access PlayerGui. You should always use a LocalScript for gui stuff.