How to make in Roblox Studio for a dummy to transform into a player?

How to make in Roblox Studio for a dummy to transform into a player? There can be a maximum of 4 people on the server, and I would like each dummy to have a player skin. Below, I am providing the script.

local Dummy = script.Parent
local Humanoid = NPC.Humanoid

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		local UserId = Player.UserId
		script.Parent.Humanoid:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(UserId))
		
	end)
end)


This script is in every dummy.

You could just do it all in 1 script like

local Dummies = {
Dummy1,
Dummy2,
Dummy3,
Dummy4

}

local LastDummy = nil

game.Players.PlayerAdded:Connect(function(Player)
	
        local Dummy

        if LastDummy == nil then LastDummy = 1 end

        Dummy = Dummies[LastDummy]

        local Hum = Dummy.Humanoid
        local UserId = Player.UserId

        Hum:ApplyDescription:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(UserId))
        LastDummy += 1

	end)
end)

So try that, just replace the dummy values in the table with the path to the dummies

1 Like

Everything is fine, but I’ve noticed that when I exit the game, the skin remains on the dummy.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.