local player = game.Players.LocalPlayer if game.Workspace.Battle.Value == true then player:WaitForChild("PlayerGui").Header.Text.Visible = false for i,v in pairs(player:WaitForChild("PlayerGui").Main:GetChildren()) do if v:IsA("GuiObject") then v.Visible = true end end end
when I start a 2 player server it dosent make the visibilty to them change
Put this in a Local Script inside StarterGui.
local player = game.Players.LocalPlayer player:WaitForChild("PlayerGui").Header.Text.Visible = false --Make the Text object in Header invisible. for i,v in pairs(player:WaitForChild("PlayerGui").Main:GetChildren()) do --Gets all children in the Main gui in the player's PlayerGui. if v:IsA("GuiObject") then --If the child is a Gui Object then v.Visible = true --Make the child visible. end end