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

How would I get the Local Player's friend clone?

2 answers

You would have to make the Clone() script, a server script instead of a local script.

What you're actually looking for is GetCharacterAppearanceAsync(), a function of the Players service. The function takes a user ID (int64) as its only argument and returns a model containing the assets that the player is wearing.

Here is such an example:

local P = game:GetService("Players")
local model = P:GetCharacterAppearanceAsync(1) -- In place of 1 you would insert the user ID
model.Parent = workspace

If done successfully, you should get a model in the Workspace.

Now, in your case, you want the LocalPlayer to be cloned. This is pretty simple: use a remote event that passes the LocalPlayer's UserID to the server.

2 comments

0

So, how would I get the Local player's friend model though, or does this script include that?

0

Remote events will pass the client that fired the event as the first argument to the server, so you can use GetCharacterAppearanceAsync(player.UserId) when the player argument is passed.

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