[CLOSED]Copy the avatar of the player joined into a custom Startercharacter

Don’t worry. The ‘if’ statement will only run only if the player has accessories otherwise nothing will happen!

Thank you so much, I tried out your script but it doesnt seem to work, I dont have the StarterCharacter rig

1 Like

Really? Just wait a minute. I’ll go on studio and test.

1 Like

Wrong, index can be cloned only if the index is a instance (essentially the table has to be a dictionary)

1 Like

Really? If so thanks for letting me know about it!

1 Like

Alright, here. This should help!

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		task.wait(5)
		
		local customCharacter = script:WaitForChild("StarterCharacter"):Clone()
		
		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
		
		print("Character changed for " .. player.Name)
	end)
end)

Plus: Found a post. It should help!

Hey so that doesnt seem to work either, it doesnt give me the rig, and it deletes my accessory’s

1 Like

Can you check the post I sent you? That should help.

1 Like

Hey so I checked it out and did what he did, and even tired what someone replied to him did, and still not working correctly.

Refer to Players | Roblox Creator Documentation (just noticed that GetCharacterAppearanceSync was deprecated) Players | Roblox Creator Documentation for getting the player accesories instead of polling at CharacterAdded (as it is a bad practice, it also does not gurantee all of the accesories will be there by 5 seconds later)

Could you help me try and swap the rig for my custom one, cause I have been looking for an hour and trying everything I see and I have got nothing.

Alr here I have an example for u.

local customChar = script.StarterCharacter

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
        for i = 0, 5, 1 do
            game:GetService("RunService").Heartbeat:Wait() -- allow all the parts in the character to load
        end
        local clone = customChar:Clone()
        for i, v in pairs(char:GetDescendants()) do
            if v:IsA("Accessory") then
                v:Clone().Parent = clone -- u can set the position too but uh idk
            end
        end
        plr.Character = clone
        clone.Name = plr.Name -- not needed but for organization, u dont want 10 things named "StarterCharacter" in workspace :troll:
        clone.Parent = workspace
    end
end

Watch out for typos i wrote this in a hurry. or u could try using what @XDify01 said. If you want I can give u a detailed explaination.

1 Like

Whenever I try to look around or walk I am always stuck in this exact position

Alr, so thats bcz some part in ur model is anchored.

Everything is unanchored though

so there is something called humanoid description you can copy the humanoid description and paste it using this link (humanoid description is located in player character → humanoid → humanoid description)

1 Like

I literally used this script a day ago and it worked fine. Well then is ur humanoid walkspeed more than 0?
other than that u could replace my script with this:

local customChar = script.StarterCharacter

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
        for i = 0, 5, 1 do
            game:GetService("RunService").Heartbeat:Wait() -- allow all the parts in the character to load
        end
        local clone = customChar:Clone()
        for i, v in pairs(char:GetDescendants()) do
            if v:IsA("Accessory") then
                v:Clone().Parent = clone -- u can set the position too but uh idk
            elseif v:IsA("BasePart") then
                v.Anchored = false
            end
        end
        plr.Character = clone
        clone.Name = plr.Name -- not needed but for organization, u dont want 10 things named "StarterCharacter" in workspace :troll:
        clone.Parent = workspace
    end
end

I think HumanoidDescriptions would be the best approach to this. I believe they should still work on a custom rig like this as long as it is setup correctly. You’ll want to be using game.Players: GetHumanoidDescriptionFromUserId() and Character.Humanoid:ApplyDescription()

You can either wait until the Character Spawns and use the ApplyDescription method as above, or set game.Players.CharacterAutoLoads to false and set up your own character loading system utilizing LoadCharacterWithHumanoidDescription

2 Likes

@SteveoAttano

Can you show us how is yout custom character structured? I will write a script if I can

Hey I appreciate the offer to help but someone has already helped me solve the problem.

1 Like