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: LoadCharacter Help

Previous Thread :: Next Thread 
superdimensionmaster is not online. superdimensionmaster
Joined: 18 Jan 2008
Total Posts: 8387
28 Oct 2012 08:20 PM
This script doesn't error, but it doesn't do what it's supposed to do. Your hats and other items don't go onto your character when it loads your character. There's probably some simple fix for this that I'm not seeing right now.



local player = script.Parent.Parent.Parent.Parent.Parent.Parent
local profilechar = player.CharProfiles.Profile1
local custom = profilechar.Appearance
local dude = player.Character

function onClicked()

player.CanLoadCharacterAppearance = false
player:LoadCharacter()
wait()

local cp = profilechar.Powers:getChildren()
for i = 1, #cp do
cp[i]:clone().Parent = player.Backpack
end
wait()

custom["Body Colors"]:clone().Parent = dude
if custom["Hat 1"]:GetChildren()[1]then
custom["Hat 1"]:GetChildren()[1]:clone().Parent = dude
end
if custom["Hat 2"]:GetChildren()[1]then
custom["Hat 2"]:GetChildren()[1]:clone().Parent = dude
end
if custom["Hat 3"]:GetChildren()[1]then
custom["Hat 3"]:GetChildren()[1]:clone().Parent = dude
end

if custom["Shirt"]:GetChildren()[1]then
custom["Shirt"]:GetChildren()[1]:clone().Parent = dude
end
if custom["Pants"]:GetChildren()[1]then
custom["Pants"]:GetChildren()[1]:clone().Parent = dude
end

if custom["Torso"]:GetChildren()[1]then
custom["Torso"]:GetChildren()[1]:clone().Parent = dude
end
if custom["Left Arm"]:GetChildren()[1]then
custom["Hat 2"]:GetChildren()[1]:clone().Parent = dude
end
if custom["Left Leg"]:GetChildren()[1]then
custom["Hat 3"]:GetChildren()[1]:clone().Parent = dude
end
if custom["Right Arm"]:GetChildren()[1]then
custom["Right Arm"]:GetChildren()[1]:clone().Parent = dude
end
if custom["Right Leg"]:GetChildren()[1]then
custom["Right Leg"]:GetChildren()[1]:clone().Parent = dude
end

if custom["face"]:GetChildren()[1]then
if dude.Head["face"] then
dude.Head["face"].Texture = custom.face.Texture
else custom.face:clone().Parent = dude.Head
end
end
if custom["Head"]:GetChildren()[1]then
if dude.Head["Mesh"] and custom then
dude.Head["Mesh"]:remove()
end
custom["Head"]:clone().Parent = dude.Head
end





script.Parent.Parent.Parent.Visible = false
script.Parent.Parent.Parent.Parent.Reset.Visible = true


--dude.Name = profilechar.Value
script.Parent.Parent.Parent.Visible = false
end

script.Parent.MouseButton1Click:connect(onClicked)
Report Abuse
LUVMARIOLUIGI10000 is not online. LUVMARIOLUIGI10000
Joined: 16 May 2009
Total Posts: 1244
28 Oct 2012 08:43 PM
LoadCharacter(true)
--Nuff Said.
Report Abuse
superdimensionmaster is not online. superdimensionmaster
Joined: 18 Jan 2008
Total Posts: 8387
28 Oct 2012 08:56 PM
I don't think you read the script.
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