|
| 15 Apr 2015 04:24 PM |
I've ran into this problem before, as well as many others.
When this problem occurred for me, I couldn't find a fix thread, perhaps this thread can do the trick.
Challenge: Wait until the character as fully loaded
Explanation: You must design a script, server or client, which will wait until all hats, faces, shirts, pants, t-shirts, and scripts have loaded inside the character. Your script will be "incorrect" if it breaks under any of "breaking situations"
Objective: Complete the challenge FIRST
Breaking situations:
1. The user wears no hats 2. The user wears more than 1 hat 3. The user has no shirt 4. The user has no pants 5. The user has no t-shirt |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2015 04:27 PM |
make a local script
plr=game.Players.LocalPlayer char=plr.CharacterAdded:wait()
--code |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 15 Apr 2015 04:28 PM |
| Wait until no ChildAdded event for 1 second? Wait until the content queue is done? |
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
|
| 15 Apr 2015 04:29 PM |
ChildAdded then wait(200) ~ even the slowest computer could have laoded this by now
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 15 Apr 2015 04:29 PM |
function onEnter(player) repeat wait() until player.Character if player.Character then print(player.Name.." is loaded") end end
game.Players.PlayerAdded:connect(onEnter)
Am I missing something here?
|
|
|
| Report Abuse |
|
|
|
| 15 Apr 2015 04:31 PM |
| You think CharacterAdded will work? Go make a game, and clone the character on CharacterAdded, see if it looks like you :) |
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
|
| 15 Apr 2015 04:33 PM |
| Why not jsut iterate through the players character and check for each thing indavidually? |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2015 04:34 PM |
| i have many games and player scripts that dont work until i add the CharacterAdded. And, aint nobody got time for that. |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 15 Apr 2015 04:36 PM |
| @yobo, that's what I was doing in my first post, but decided it was a waste of my finger typing and just deleted all of it to player.Character l0l |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2015 04:46 PM |
"Why not jsut iterate through the players character and check for each thing indavidually?"
See breaking situations #1, #3, #4, and #5 |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2015 04:49 PM |
I know you make a fake character with the same appearance as the character is suppose to be and then wait until they look the same 100% solution
But I would suggest using child added and waiting |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2015 04:55 PM |
| @Above But how do you know that they don't look the same, if you don't have the fully loaded character to compare against? |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2015 04:57 PM |
| Well when I made the post I was thinking about the CharacterApperence property but than I remembered it was for the player, so I don't know. |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2015 04:59 PM |
Okay come on now, nobody can solve this? We're supposed to be an elite group of scripters on this forum, and we can't solve such a simple, basic task?
We should feel ashamed XD |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 15 Apr 2015 05:00 PM |
| "We're supposed to be an elite group of scripters on this forum" |
|
|
| Report Abuse |
|
|
iiEssence
|
  |
| Joined: 18 Jun 2014 |
| Total Posts: 3467 |
|
| |
|
|
| 15 Apr 2015 05:05 PM |
@Time ik we all suck' but back to the point. I don't think I've actually ever seen a fool proof solution to this.
Imagine someone is playing this on an EXTREMELY slow laptop which takes 30 min to even START the game. You need a fool proof method for this. |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 15 Apr 2015 05:09 PM |
Isn't there a way to get the persons clothes they are wearing from their page?
Find those and wait until they are in the character.
I script -~ chimmihc |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 15 Apr 2015 05:28 PM |
| I already offered my solutions based on my minimal knowledge of the API |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 15 Apr 2015 05:29 PM |
'Imagine someone is playing this on an EXTREMELY slow laptop which takes 30 min to even START the game. You need a fool proof method for this.' Then they shouldn't be playing Roblox.
Just wait 5 seconds at the most. |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 15 Apr 2015 05:41 PM |
| Why not use the HttpService and fetch what the player is wearing//how they're coloured with the CharacterAppearance property, use InsertService to figure out the name of the wearable assets and then check for pants/shirt/tshirt? |
|
|
| Report Abuse |
|
|
Froast
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 3134 |
|
|
| 15 Apr 2015 05:58 PM |
| player.CharacterAdded:wait():WaitForChild'Body Colors' |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 09 Jul 2015 09:37 AM |
Necrobump
I have been wondering this too. Is there nothing that does something to the effect of 'WaitForCharacterLoaded' ?? |
|
|
| Report Abuse |
|
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
|
| 09 Jul 2015 09:44 AM |
| What's the last thing that loads on a character? Probably BodyColors, so wait for that. |
|
|
| Report Abuse |
|
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
|
| 09 Jul 2015 09:49 AM |
Maybe this:
game.Players.PlayerAdded:connect(function(p) local now=tick() p.CharacterAdded:connect(function(c) local now2=tick() wait(now-now2) print("Character Loaded!") end) end) |
|
|
| Report Abuse |
|
|