Hello, I wanted to know how I can put the player’s skin on an npc, I was looking in the devforum and in other places but what I ended up having was a serverscript on the npc: ```lua
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local skin = game.Players:GetHumanoidDescriptionFromUserId(player.UserId)
skin.Parent = script.Parent.Humanoid
wait()
script.Parent.Humanoid.Health = 0
end)
end)
And a script to respawn and apply the HumanoidDescription, but it didn’t work, any help is aprecciated!
1 Like
rxdddy
(reddy)
February 12, 2024, 5:48am
#2
You could just clone the players character and then insert and delete all the scripts you want
1 Like
like this?
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local char = character:Clone()
char.Parent = script.Parent
end)
end)
(The scipt is in the npc)
You can do something like
local skin = game.Players:GetHumanoidDescriptionFromUserId(player.UserId)
script.Parent.Humanoid:ApplyDescription(skin)
1 Like
It actually worked. Thank you!
system
(system)
Closed
February 26, 2024, 6:31am
#6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.