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!
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!
You could clone the player’s character and then insert your NPC script in that character. With additional changes to both, ofcourse.
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
why not use r6? its much easier to change the properties of an r6 rather than an r15
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
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().
problem
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
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.