So apparently that happens when i run this.
1 | for i, child in ipairs (guis) do |
2 | local gui = child:Clone() |
3 | gui.Name = gui.Name.. " parented to " ..owner.Name.. " from " ..name |
4 | gui.Parent = owner.PlayerGui |
5 | print ( "Parented " ..child.Name.. " from " ..name) |
6 | end |
Help!
The problem was you forgot the () at line 5, all credit to @killerbrenden
Copy this script:
01 | local children = game.Players:GetChildren() |
02 | for i, child in ipairs (children) do |
03 | local name = child.Name |
04 | print ( "Currently on player " ..child.Name .. " No. " .. i) |
05 | local guis = child.PlayerGui:GetChildren() |
06 | for i, child in ipairs (guis) do |
07 | local gui = child:Clone() |
08 | gui.Name = gui.Name.. " parented to " ..owner.Name.. " from " ..name |
09 | gui.Parent = owner.PlayerGui |
10 | print ( "Parented " ..child.Name.. " from " ..name) |
11 | end |
12 | end |
13 | print ( "Done!" ) |
Full script:
01 | local children = game.Players:GetChildren() |
02 | for i, child in ipairs (children) do |
03 | local name = child.Name |
04 | print ( "Currently on player " ..child.Name .. " No. " .. i) |
05 | local guis = child.PlayerGui:GetChildren |
06 | for i, child in ipairs (guis) do |
07 | local gui = child:Clone() |
08 | gui.Name = gui.Name.. " parented to " ..owner.Name.. " from " ..name |
09 | gui.Parent = owner.PlayerGui |
10 | print ( "Parented " ..child.Name.. " from " ..name) |
11 | end |
12 | end |
13 | print ( "Done!" ) |