Changing avatar script

Hello,
I’m writing a script that will get all the player accessories, move them to a dummy then make the player that dummy.

The script works all fine, but it doesn’t change the player to the dummy.
The script gives all the outputs; swap the accessories parent, write the line 22. But it doesn’t change character.
Script:

local Players = game.Players
local Starter = game.ReplicatedStorage.StarterCharacter

Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(character)
		task.wait(5)

		local customCharacter = Starter:Clone()
		customCharacter.Parent = workspace

		for i, accessory in pairs(character:GetChildren()) do
			if accessory:IsA("Accessory") then
				print(accessory.Name) -- Optional (just checking)
				accessory.Parent = customCharacter
			end
		end

		task.wait(2.5)

		character = customCharacter --This line seems to give nil? it does nothing
		
		print("player avatar changed")
	end)
end)

I tried searching around but found nothing

You can’t move this script, but you can set dummy as starter character

1 Like

move the script?
and i need to use the script as morph

you can eventually turn player character into dummy, changing it propertiess, deleting meshes making character blocky , and changing body part materials and color or maybe transparency

how can i turn body parts to other body parts?

try to manipulate mesh id of body parts, i’m never done this before, but you should study character structure

1 Like

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