Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why won't the script load the character?

Asked by 10 years ago
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.

0
Anything in the output? Redbullusa 1580 — 10y
0
Try and omit "&placeId=0" in the ID. Redbullusa 1580 — 10y
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. EzraNehemiah_TF2 3552 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

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)
Ad

Answer this question