mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
|
| 16 Mar 2013 09:27 AM |
I don't see anything wrong with it but it's not working. I've checked all the variabled are correct and they are so what's wrong?
function onEnter(player) c = game.Lighting.Game.Guis.OnEntered:GetChildren() for i = 1, #c do GiveGuis = c[i]:Clone() GiveGuis.Parent = player.PlayerGui end end game.Players.PlayerAdded:connect(onEnter) |
|
|
| Report Abuse |
|
|
sammy1229
|
  |
| Joined: 05 Aug 2010 |
| Total Posts: 669 |
|
|
| 16 Mar 2013 09:33 AM |
Are you putting frames into PlayerGui? What are the Children of OnEntered |
|
|
| Report Abuse |
|
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
|
| 16 Mar 2013 09:37 AM |
A ScreenGui called "StartGame" and then a few other PlayerStats guis. I've tried just cloning one Gui into PlayerGui when they enter and that won't work either. |
|
|
| Report Abuse |
|
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
|
| 16 Mar 2013 09:45 AM |
Try adding "repeat wait(); until (player.Character);" as the first line in the function.
Btw, this line really confused me for a minute: c = game.Lighting.Game.Guis.OnEntered:GetChildren() |
|
|
| Report Abuse |
|
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
|
| 16 Mar 2013 09:48 AM |
Theres a Configuration inside Lighting called "Game" It has Configs with all the tools, guis, CameraInserts, Etc. |
|
|
| Report Abuse |
|
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
|
| 16 Mar 2013 09:53 AM |
| Btw, Thanks Dr01d3k4, It worked. |
|
|
| Report Abuse |
|
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
|
| 16 Mar 2013 09:56 AM |
Yw. Btw, I'd recommend using the generic for loop here:
for _, g in pairs(game.Lighting.Game.Guis.OnEntered:GetChildren()) do local c = g:Clone(); g.Parent = player.PlayerGui; end |
|
|
| Report Abuse |
|
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
| |
|