Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why won't the script load the character?

game.Players.ChildAdded:connect(function(newPlayer)
	wait(.5)
	newPlayer.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=42584068&placeId=0"
	local stats = Instance.new("IntValue") 
	stats.Name = "leaderstats"
	local stage = Instance.new("StringValue")
	stage.Name = "Stage" 
	stage.Value = "Tutorial"
	stage.Parent = stats 
	stats.Parent = newPlayer 
	newPlayer.Character.Humanoid.Health = 0
	wait(6)
	newPlayer:LoadCharacter()
end)

It doesn't change the character's appearance.

3 comments

0

Anything in the output?

0

Try and omit "&placeId=0" in the ID.

0

Red, How I did it I had them wait for 15 seconds and then they load. But their WalkSpeed is 0.  I don't  like how  I did it.

1 answer

I think this should work. Try this instead:

game.Players.ChildAdded:connect(function(newPlayer)
    wait(.5)
    newPlayer.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=42584068&placeId=0"
    local stats = Instance.new("IntValue") 
    stats.Name = "leaderstats"
    local stage = Instance.new("StringValue")
    stage.Name = "Stage" 
    stage.Value = "Tutorial"
    stats.Parent = newPlayer  -- I switched these two. Why? Because you're basically trying to get Stage into a Object, that doesn't exist yet. You need to change the Parent before you can put anything in it. You can change Properties, but you can not put something in it yet. 
    stage.Parent = stats 
    newPlayer.Character.Humanoid.Health = 0
    wait(6)
    newPlayer:LoadCharacter()
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.