generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: What's Wrong with this?

Previous Thread :: Next Thread 
mark298 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
16 Mar 2013 09:53 AM
Btw, Thanks Dr01d3k4, It worked.
Report Abuse
Dr01d3k4 is not online. 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 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
16 Mar 2013 10:26 AM
Ok, Thankyou.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image