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: GUI cloning error

Previous Thread :: Next Thread 
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
01 Oct 2013 04:48 AM
game.Players.PlayerAdded:connect(function(plyr)
script:FindFirstChild("WelcomeXenox"):Clone().Parent = plyr.PlayerGui
end)

The error I got is that PlayerGui is not a valid member of Player, this is in a normal script. Does anyone know why this is happening? Oh, the script is also in Workspace. There is more to this script and I need it to only show once, so don't tell me to put it in StarterGui.
Report Abuse
Marolex is not online. Marolex
Joined: 17 Dec 2012
Total Posts: 1785
01 Oct 2013 04:50 AM
This means the player has not fully loaded yet, use the :WaitForChild function. or just throw some random wait time in there...
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
01 Oct 2013 04:51 AM
Ok, thought that might be it. I'll add that and see if it works.
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
01 Oct 2013 04:57 AM
I need to access the CurrentCamera in the same script, so I moved it to a LocalScript, but now the GUI doesn't show and there are no errors.

What would I need to change to make it work in a LocalScript?
Report Abuse
Marolex is not online. Marolex
Joined: 17 Dec 2012
Total Posts: 1785
01 Oct 2013 05:00 AM
Anything with "game.something" is not a local process so i would convert that if i where you then
Report Abuse
IamAwesome777 is not online. IamAwesome777
Joined: 18 Jul 2011
Total Posts: 2640
01 Oct 2013 05:02 AM
Most events don't function properly in localscripts because they get replicated.
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
01 Oct 2013 05:04 AM
What about game.Players.LocalPlayer?
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
01 Oct 2013 05:04 AM
Oh, so I might make it into 2 scripts....
Report Abuse
Marolex is not online. Marolex
Joined: 17 Dec 2012
Total Posts: 1785
01 Oct 2013 05:05 AM
Recommended.
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
01 Oct 2013 05:18 AM
The normal script works, but now I'm having trouble with the CurrentCamera. No output but it doesn't change the camera at all. I can't use an event of course, so what do I do?

wait()
Workspace.CurrentCamera.CameraSubject = Workspace.CoPart
Workspace.CurrentCamera.Focus = Workspace.FocusPart.CFrame
Workspace.CurrentCamera.CameraType = "Scriptable"
Workspace.CurrentCamera.CoordinateFrame = Workspace.CoPart.CFrame
Workspace.CurrentCamera.FieldOfView = 30
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
01 Oct 2013 05:19 AM
Do I need to use CoordinateFrame instead of Focus because the CameraType is scriptable?
Report Abuse
Marolex is not online. Marolex
Joined: 17 Dec 2012
Total Posts: 1785
01 Oct 2013 05:22 AM
Thats editing the workspaces camera not the local players camera...
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
01 Oct 2013 05:23 AM
*facepalm* I used the Workspace when testing. XD
Report Abuse
Marolex is not online. Marolex
Joined: 17 Dec 2012
Total Posts: 1785
01 Oct 2013 05:25 AM
Oops i read that wrong sorry, Make sure it tracks the coords
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
01 Oct 2013 05:29 AM
Not sure what you mean by that.... Could you give an example?
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
01 Oct 2013 06:46 AM
Bumpzors
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
01 Oct 2013 02:51 PM
Bumpty Dumpty
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
01 Oct 2013 04:12 PM
3rd bump
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
02 Oct 2013 01:49 PM
4th bump
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
04 Oct 2013 01:37 PM
bummppp
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
05 Oct 2013 07:18 AM
Boomp
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
09 Oct 2013 01:11 PM
bumping it up againnnn
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