I’m making a meme game with some friends. I’m trying to make the person on the train track look like the person who is in the game. I used load character plugin to load the npc into the game.
Are you getting errors? There’s at least one typo in your code:
game.Workpace.e.Humanoid
Also, do you intend this to constantly change the character on the tracks to the most-recently-respawned player? Because that’s what this code looks like its doing,
game.Players.LocalPlayer.CharacterAdded:Connect(function(Character)
local humanoid = Character:WaitForChild("Humanoid")
local humanoidDescription = humanoid:GetAppliedDescription()
local npcHumanoid = workspace.e.Humanoid
npcHumanoid:ApplyDescription(humanoidDescription)
end)
You would probably also want to run that code once when the player initially joins, in case their character already exists by the time the CharacterAdded event is hooked up.
Sadly it didn’t work. I used the exact script you told me to use.
game.Players.PlayerAdded:Connect(function(p)
local appearanceModel = game.Players:GetCharacterAppearanceAsync(p.UserId)
appearanceModel.Parent = game.Workspace.e --- e is the model name.
If that method doesn’t work, I’m sure that my alternative one will function as intended, but I’d wait for the character to load in, anchor the parts, clone yourself and position every single character part to the same position (this also goes with Orientation). For your scenario:
local npc = game.Workspace:FindFirstChild("YOUR_NPC_NAME")
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
repeat wait()
char.Archivable = true
local clone = char:Clone()
for _, i in pairs(clone:GetDescendants()) do
if i:IsA("MeshPart") then
i.Anchored = true
i.Position = npc:FindFirstChild(i.Name).Position
i.Orientation = npc:FindFirstChild(i.Name).Orientation
end
if i:IsA("Part") then
i.Anchored = true
i.Position = npc:FindFirstChild(i.Name).Position
i.Orientation = npc:FindFirstChild(i.Name).Orientation
end
end
char.Archivable = false
clone.Parent = npc
until game:IsLoaded()
-- localscript in StarterPack