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: Missing PlayerGui

Previous Thread :: Next Thread 
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
10 Mar 2014 06:54 PM
This isnt a problem that I'm trying to create something before it loads, but that it either isn't loading or something is setting its parent to nil. I checked ALL my scripts and nothing is destroying the player's playergui. Any ideas?
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
10 Mar 2014 07:00 PM
I opened up two players in a server on studio. The result was that on the server window, both playerguis exist. But on the individual player windows, only their playergui existed. This is the error message:

19:59:02.854 - PlayerGui is not a valid member of Player
19:59:02.854 - Script 'Players.Player2.PlayerGui.Status.Frame.TextBox.LocalScript', Line 10
19:59:02.858 - stack end
Report Abuse
CitreIthkarr is not online. CitreIthkarr
Joined: 09 Jan 2014
Total Posts: 454
10 Mar 2014 07:01 PM
Its a big problem for me too! YOu just basically need the script to figure out when everything is loaded in, because roblox doesnt have any way to detect that (atleast in studio, I dont do much outside of studio)
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
10 Mar 2014 07:12 PM
Sorry, I'm confused by what you said...
Report Abuse
CitreIthkarr is not online. CitreIthkarr
Joined: 09 Jan 2014
Total Posts: 454
10 Mar 2014 07:15 PM
Everything has to load in when the game starts. PlayerGui does not exist at the time the script is starting, and therefor you need a way to check when everything is loaded in
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
10 Mar 2014 07:19 PM
Can you post line 10?
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
10 Mar 2014 07:21 PM
I can post everything, it isn't too long.

player = script.Parent.Parent.Parent.Parent.Parent
box = script.Parent
mouse = player:GetMouse()

mouse.KeyUp:connect(function(key)
if key:byte() == 47 then
box:CaptureFocus()
elseif key:byte() == 13 then
for _,plr in pairs(game.Players:GetPlayers()) do
for _,label in pairs(plr.PlayerGui.Status:GetChildren()) do
if label.ClassName == "TextLabel" then
label.Position = UDim2.new(label.Position.X.Scale,10,label.Position.Y.Scale + 0.035,0)
if label.Position.Y.Scale >= 0.25 then
label:Destroy()
end
end
end
new = Instance.new("TextLabel",plr.PlayerGui.Status)
new.BackgroundTransparency = 1
new.Position = UDim2.new(0,10,.05,0)
new.Size = UDim2.new(.2,0,.03,0)
new.Text = "SourceSansBold"
new.FontSize = "Size14"
new.Text = ""..player.Name..":"..box.Text..""
new.TextColor3 = player.TeamColor.Color
new.TextTransparency = .25
new.TextXAlignment = "Left"
end
box.Text = 'To chat, click here or press "/" key'
end
end)
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
10 Mar 2014 07:22 PM
Try adding:

repeat Wait() until Player:FindFirstChild("PlayerGui")

Or maybe just "Wait()" at the top of the script.
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
10 Mar 2014 07:24 PM
Sure. That shouldn't be a problem since its a keyup activated event but I'll try it
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
10 Mar 2014 07:26 PM
Nope
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
10 Mar 2014 07:26 PM
Try:

for _,label in pairs(plr:WaitForChild("PlayerGui").Status:GetChildren()) do
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
10 Mar 2014 07:29 PM
waitforchild should work.
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
10 Mar 2014 07:35 PM
Nope. I'm pretty sure it is not a loading problem. The playergui IS THERE, but it does not show that it is there for other players.
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