How i create a npc with the player character?

i creating an mandaela type of game but idk how to create a npc with the player character

i didn’t found anything on the devforum

you can even give me a tutorial

thanks to everyone that helps me! :wink:

4 Likes

You could clone the player’s character and then insert your NPC script in that character. With additional changes to both, ofcourse.

1 Like

ok is good but i want to create a custom face but…

if the player has an animated face?

You can dissallow DynamicHeads for your game.

then new problem:

bundles ex:(dog, cat, stickbug)

You can get the Humanoid Description with this: Players | Documentation - Roblox Creator Hub

And then make a new Humanoid with the Humanoid Description you’ve gotten earlier with this: Players | Documentation - Roblox Creator Hub

Then just paste in your scripts.

i don’t really understand the web pages :sweat_smile:

why not use r6? its much easier to change the properties of an r6 rather than an r15

2 Likes

ok im using r6 but idk how to script the:

npc turns into the player

local PlayerId = 0
local desc:HumanoidDescription = game:GetService("Players"):GetHumanoidDescriptionFromUserId(PlayerId)
local char:Model = game:GetService("Players"):CreateHumanoidModelFromDescription(desc)
char.Parent = workspace
1 Like

so, i would ideally use

local players = game:GetService("Players")
local workspace = game:GetService("WorkSpace")
local plr = players.LocalPlayer
local chr = plr.Character

players.OnPlayerAdded:Connect(function()
local npc = chr:Clone()
npc.Parent = workspace
npc.Name = npc
end)

edit: i have not used my brain and now i realised that this is a script, not a local

That may bring issues, it’s way easier to use CreateHumanoidModelFromDescription. Your code would also result chr = nil then a error because you’re attempting to do nil:Clone().

1 Like

problem :smiling_face_with_tear:

here the script for reference:

local PlayerId = game:GetService("Players").LocalPlayer.CharacterAppearanceId
local desc:HumanoidDescription = game:GetService("Players"):GetHumanoidDescriptionFromUserId(PlayerId)
local char:Model = game:GetService("Players"):CreateHumanoidModelFromDescription(desc, Enum.RigType.R15, Enum.AssetTypeVerification.Default)

char.Parent = workspace
local PlayerId = game:GetService("Players").LocalPlayer.UserId

This looks interesting … players-character-onto-a-npc

1 Like

Yea, useful resource. Thanks for sharing!

There is a post down in that thread that looks like he knows what he is talking about. I’d look harder at that than the resource posted.