I am trying to make this "MapChooserGui" from Lighting clone into every player's PlayerGui, what I did was:
local mapChooserGui = game.Lighting:FindFirstChild("MapChooserGui"):Clone() for i,v in pairs(game.Players:GetPlayers()) do mapChooserGui.Parent = v.PlayerGui end
This only works once somehow then when the game script repeats gives me this error in the output
The Parent property of MapChooserGui is locked, current parent: NULL, new parent PlayerGui
Someone help me please!
As GoldenPhysics said, you have to make multiple clones: one for each Player.
local mapChooserGui = game.Lighting:FindFirstChild("MapChooserGui") for _, v in pairs(game.Players:GetPlayers()) do --We never use 'i', so I marked it as such. mapChooserGui:Clone().Parent = v.PlayerGui --I moved the 'Clone' call to here, so it makes a new clone for each Player. end
I would have it in a frame, in the players backpack, then have a local script that is on a loop, and the waittime before it activates the frme to appear again is the length per round. such as this:
while true do wait(enter round time here plus 1 or something) mapchooser = script.Parent.mapchoosergui.MapChooserGuiFrame mapchooser.Visible = true wait(time you want it to appear) mapchooser.Visible = false end