Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a npc killer take a players skin?

Anyone know how I can do a thing where whenever a npc killers kills a player it then looks like that player?

3 comments

0

Like the one in Aperiophobia

0

i have heard people talk about Apeirophobia if theres a killer in it that looks like a player when it kills that player then yes like the one in Apeirophobia

0

Maybe check which player did NPC kill, then find all clothing class in that player's character and destroy clothing in npc and replace it with ones from player

1 answer

Hello,

Assuming you already have some sort of AI just put this in your model/npc and it should work

local PlayersService = game:GetService("Players")

script.Parent:FindFirstChild("Humanoid").Touched:Connect(function(hit)
	if hit and hit.Parent:FindFirstChild("Humanoid") and PlayersService:GetPlayerFromCharacter(hit.Parent) then
		
		local player = PlayersService:GetPlayerFromCharacter(hit.Parent)
		local userId = player.UserId
		
		local description = PlayersService:GetHumanoidDescriptionFromUserId(userId)
		
		script.Parent:FindFirstChild("Humanoid"):ApplyDescription(description)
		
	end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.