So, I have been trying to make a new game, but I ran into a problem. I couldn't figure out how to make the Local player's friend's model, show up. I tried the Developer hub, but I'm not 100% good in scripting, and anyone please help?
What I used. https://developer.roblox.com/en-us/api-reference/function/Player/GetFriendsOnline
(Note I'm trying to get the Client's friends, not there friend list/table.).
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.