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: Roblox broke player.Character?

Previous Thread :: Next Thread 
Wheatlies is not online. Wheatlies
Joined: 30 Jun 2010
Total Posts: 230
16 May 2013 03:19 PM
function doobly(player)
repeat wait() until player.Character
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
end
game.Players.ChildAdded:connect(doobly)

Never does anything, I figure roblox broke it.
Report Abuse
Wheatlies is not online. Wheatlies
Joined: 30 Jun 2010
Total Posts: 230
16 May 2013 03:21 PM
Player.Character doesn't return nil when referenced via command bar, maybe .ChildAdded is broken?
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
16 May 2013 03:28 PM
No, ROBLOX hasn't broken it, at all. Sometimes the player will load before the script does, which means the event will not 'fire'.
Report Abuse
Wheatlies is not online. Wheatlies
Joined: 30 Jun 2010
Total Posts: 230
16 May 2013 03:28 PM
That only happens in visit, I thought? I've been trying it in server as well.
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
16 May 2013 03:29 PM
This always happens in Build mode. You're Player loads first in Buildmode. Period.
Report Abuse
Wheatlies is not online. Wheatlies
Joined: 30 Jun 2010
Total Posts: 230
16 May 2013 03:30 PM
I even removed the repeat wait() and still nothing printed. I'm certain roblox broke it.
Report Abuse
Wheatlies is not online. Wheatlies
Joined: 30 Jun 2010
Total Posts: 230
16 May 2013 03:31 PM
Killerkyle, I removed that line and I've also tried starting a server beforehand and then adding a player. It still doesn't work. Thus I'm very certain that it's broken.
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
16 May 2013 03:31 PM
Or, or, maybe, just maybe, you can listen to what we are telling you and stop whining. That's a plan too.
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
16 May 2013 03:32 PM
What about now?

function doobly(player)
player.CharacterAdded:wait()
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
print("SDHAJJJJJJJJJS")
end

game.Players.PlayerAdded:connect(doobly)
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
16 May 2013 03:32 PM
Nothing happened because all you're doing is printing non-sense in console. You can't see console in online mode.
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
16 May 2013 03:33 PM
ROBLOX hasn't broken it. I do not know what you're doing because this worked perfectly fine when I just ran it on solo Wheat.
Report Abuse
Wheatlies is not online. Wheatlies
Joined: 30 Jun 2010
Total Posts: 230
16 May 2013 03:33 PM
I'm not whining, I tried the things people told me and they happened to not work. I appreciate the help, though.

I'm just pretty sure that serverside scrips load before a player if a server is started beforehand.
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
16 May 2013 03:35 PM
Yes! They do! In online mode!

Your script works fine. All you're doing is printing in console. You will not see results in online mode.

Build mode you load before the script. You will not see results in Build mode.
Report Abuse
Wheatlies is not online. Wheatlies
Joined: 30 Jun 2010
Total Posts: 230
16 May 2013 03:35 PM
Thanks desper, well since no one else is having it I'll try and figure it out, hopefully I'm not just insane
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
16 May 2013 03:36 PM
Also player loads faster than server in solo, so take that in mind. You might want to try to do:

Tools>Test>Start server
Tools>Test>Start player
Report Abuse
iTriumph is not online. iTriumph
Joined: 04 May 2013
Total Posts: 19
16 May 2013 03:37 PM
Works fine for me too.
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
16 May 2013 03:37 PM
Turn off CharacterAutoLoads and then manually load the character?

Then you can wait a few seconds before loading the character if you'd like.

Alternatively, you might want to wait before the function begins.

~ The ATR Fishie ~
Report Abuse
Wheatlies is not online. Wheatlies
Joined: 30 Jun 2010
Total Posts: 230
16 May 2013 03:37 PM
As it turns out, I had functions excecuting before the code in question, and they were causing a delay that I wasn't waiting to happen before the listening functions actually started listening.

Thanks for the help
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
16 May 2013 03:40 PM
Alright, also, you have serverside scripts and clientside scripts mixed up. You typically have to wait in local scripts because the code will load before the argument.

~ The ATR Fishie ~
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
16 May 2013 03:41 PM
No, code simply loads faster than your character/player GUI, since there is ping between client and server, but local scripts runs off client, while player is handled on server.
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