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
 

Another "Works in Test Server, not online" post.

Previous Thread :: Next Thread 
DrWaffler is not online. DrWaffler
Joined: 16 Sep 2011
Total Posts: 4248
16 Feb 2014 10:45 PM
This one has me stumped though. Below I'll include everything that isn't irrelevant. Irrelevant parts will be -snipped-.

game:GetService("Players").PlayerAdded:connect(function(plr)
-snip-
plr.CharacterAdded:connect(function(char)


randomColor = colors[math.random(1,#colors)]
game.Players:GetPlayerFromCharacter(char):ClearCharacterAppearance()
char.Head:findFirstChild("face").Texture = "rbxasset://textures/face.png"
char.Head.Mesh.MeshType = "Head"
char.Head.Mesh.MeshId = ""
char["Left Arm"].BrickColor = BrickColor.new("Light orange")
char["Right Arm"].BrickColor = BrickColor.new("Light orange")
char["Left Leg"].BrickColor = BrickColor.new("Light orange")
char["Right Leg"].BrickColor = BrickColor.new("Light orange")
char["Head"].BrickColor = BrickColor.new("Light orange")
char["Torso"].BrickColor = BrickColor.new(randomColor)

-snip-

end)
end)

--[Territory Conquest Developer, Valerian Studios Developer, Business Casual Narwhal Moai. ]]--
Report Abuse
noah is not online. noah
Joined: 11 Sep 2006
Total Posts: 18977
16 Feb 2014 11:03 PM
"game.Players:GetPlayerFromCharacter(char):ClearCharacterAppearance()"

y not just plr:ClearCharacterAppearance()?

game:GetService("Players").PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
char:WaitForChild("BodyColors")
randomColor = colors[math.random(1,#colors)]
plr:ClearCharacterAppearance()
char.Head:findFirstChild("face").Texture = "rbxasset://textures/face.png"
char.Head.Mesh.MeshType = "Head"
char.Head.Mesh.MeshId = ""
char["Left Arm"].BrickColor = BrickColor.new("Light orange")
char["Right Arm"].BrickColor = BrickColor.new("Light orange")
char["Left Leg"].BrickColor = BrickColor.new("Light orange")
char["Right Leg"].BrickColor = BrickColor.new("Light orange")
char["Head"].BrickColor = BrickColor.new("Light orange")
char["Torso"].BrickColor = BrickColor.new(randomColor)

-snip-

end)
end)
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
16 Feb 2014 11:09 PM
Player loads way before character in an actual server. Pointing that out now.
Report Abuse
DrWaffler is not online. DrWaffler
Joined: 16 Sep 2011
Total Posts: 4248
16 Feb 2014 11:43 PM
the snips are quite a large amount of code, so between the beginning and there I forgot a few things that may have made the line more efficient.

--[Territory Conquest Developer, Valerian Studios Developer, Business Casual Narwhal Moai. ]]--
Report Abuse
Virtual3D is not online. Virtual3D
Joined: 15 Jan 2009
Total Posts: 634
17 Feb 2014 12:01 AM
So long that it would still be reading the code before the character loads? Try adding a 10 second wait for testing purpose. Could be that.
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