How do i change a character for a specific player

I want to change the character of a player but not at the start of the game with startercharacter. I want to change it when the player clicks a button or something.

The character changes but it cant move at all, like no jump or walk. i get an error in every local script in any gui and in the character. For some reason if i copy my character model then replace the custom model with my character, it works but i still get the errors. I tried taking every part from my character and putting it in the custom character but its still not moving at all.

I tried this (i found this code on another post but its not working):

local Players = game:GetService("Players")
local Clone = game.ReplicatedStorage.SomeModels.TNT25556:Clone()

Players.CharacterAutoLoads = false

Players.PlayerAdded:Connect(function(player)
	player:LoadCharacter()
	player.Character = Clone
	player.Character.Parent = workspace
end)

Also this is what the character has in it:
image

If you want it on UI, there’s a simple event for this.


local plr = game.Players.LocalPlayer

GuiButton.Activated:Connect(function()
-- Run your code here
end)

i mean i want the changing character to work. i can do the button part but the problem is that the character dosent change right.

I think it’s because of this line of code, you can’t directly change the character. In the way that you want, kinda hard to explain.

From what I can see, your models in rep storage have clothing, body colors, etc.

Make the character’s bodycolors match the model’s body colors, make the character’s clothing match the model’s clothing etc.

Here’s example code:

local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()

char.Clothing = Clone.Clothing.ClothingTextureId

PS: I don’t remember the exact syntax for these things. But I think you get the general idea.

thank you. for the rest i think i can just copy everything from that character to the player. i did player.character = clone bc i saw most people who had a similar problem to mine used it and it worked

If you change your character model to another model and you can’t move.it may because the part in model is anchored. You should set the part’anchored =false.

for _,p in pairs((the new character model):GetDescendants()) do
if p:IsA(“BasePart”) or p:IsA(“MeshPart”) then
p.Anchored = false
end
end

Sorry let me make the code a bit more clear because I think I got some things weird,

You could also try cloning some stuff from the custom model and parent it to the character, for example body colors. It would be tiresome to match ALL the colors. So you can just parent it to the character and it should match. And delete the original character’s bodycolors.

This doesn’t always work, but works for some stuff like bodycolors.

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