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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Is ChildAdded working?

Previous Thread :: Next Thread 
HadesDude is not online. HadesDude
Joined: 16 Feb 2009
Total Posts: 11982
08 Jun 2013 09:44 PM
This script was in a localscript. It should be working.

game.Players.ChildAdded:connect(function(p)
local m = Instance.new(Message', game.Players.LocalPlayer.PlayerGui)
m.Text = p.Name.. " has entered the game."
wait(3)
m:Destroy()
end)
Report Abuse
Fattycat17 is not online. Fattycat17
Joined: 26 Jun 2011
Total Posts: 1527
08 Jun 2013 09:53 PM
Ha-ha I was bothered about this a while ago too

But ChildAdded and PlayerAdded events don't work on Play Solo you actually need to upload the place on roblox and test it (Real pain)

Apparently this happens because Players actually load after the Player service on Play Solo (Idk really how that can even work)
Report Abuse
Voidion is not online. Voidion
Joined: 01 Aug 2011
Total Posts: 2668
08 Jun 2013 09:55 PM
"you actually need to upload the place on roblox and test it"

Or do:

Tools > Test > Start Server, Tools > Test > Start Player
Report Abuse
HadesDude is not online. HadesDude
Joined: 16 Feb 2009
Total Posts: 11982
08 Jun 2013 10:10 PM
I was using this on a Script Builder to tell me when players entered the game. It still didn't work.
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
08 Jun 2013 10:18 PM
The GUI loads before scripts. You would need a wait, or a waitforchild.
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
08 Jun 2013 10:18 PM
**SCRIPTS LOAD BEFORE THE PLAYERGUI
Report Abuse
HadesDude is not online. HadesDude
Joined: 16 Feb 2009
Total Posts: 11982
08 Jun 2013 10:31 PM
I use it after I join the game, so my PlayerGui should be there before I even create the script in the SB.
Report Abuse
HadesDude is not online. HadesDude
Joined: 16 Feb 2009
Total Posts: 11982
08 Jun 2013 10:47 PM
I changed it to this and it still didn't work :/

game.Players.ChildAdded:connect(function(p)
g = game.Players.LocalPlayer:findFirstChild("PlayerGui")
if g ~= nil then
local m = Instance.new('Message', game.Players.LocalPlayer.PlayerGui)
m.Text = p.Name.. " has entered the game."
wait(3)
m:Destroy()
else
if g == nil then
repeat
wait()
until g ~= nil
local m = Instance.new('Message', game.Players.LocalPlayer.PlayerGui)
m.Text = p.Name.. " has entered the game."
wait(3)
m:Destroy()
end
end
end)
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