local players = game.Players:GetChildren()
for i,v in pairs(players) do
v.PlayerGui.ScreenGui.Frame.Visible = true
end
is this how for i,v in pairs(players)do work?
local players = game.Players:GetChildren()
for i,v in pairs(players) do
v.PlayerGui.ScreenGui.Frame.Visible = true
end
is this how for i,v in pairs(players)do work?
Incase a user doesn't have the gui and the script breaks, use this:
local players = game.Players:GetChildren()
for i,v in pairs(players) do
if v and v:FindFirstChild("PlayerGui") ~= nil and v.PlayerGui:FindFirstChild("ScreenGui") ~= nil then
v.PlayerGui.ScreenGui.Frame.Visible = true
end
end
ok cool thanks but will this only work for 1 player or all the players in the game?
Upvote me if you could please, thanks. I hope I could help.
Do you even know what for i, v are actually? and what GetChildren() does?
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
Yes.
ok
so will this make the frame visible for every player in the game or just 1 player?
All