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

How can I load a players character into the game?

Asked by
Hexcede 52
9 years ago

I am trying to load a character of a player into the game. The player is not in the specific place. I want to load a players character by id from roblox. I have tried the code below:

game.InsertService:ApproveAssetId(35904028)
game.InsertService:loadAsset(35904028).Parent = workspace

No errors but the model inserted is empty, no character to be found. Please help me!

0
Someone?! Hexcede 52 — 9y

1 answer

Log in to vote
0
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
9 years ago

Currently the only way to load the assets contained by a player's character is by setting an actual ingame player's CharacterAppearance to that of the desired player and then respawning the player.

Player.CharacterAppearance="http://www.roblox.com/Asset/CharacterFetch.ashx?userId=35904028"
Player:LoadCharacter()
0
Thank you! That also gives me an idea! My idea is I set a player in the game to the character appearance, clone them, and set their character appearance back. Also you can use Player:LoadCharacterAppearance(...) or something like that. Hexcede 52 — 9y
Ad

Answer this question