Character Cloning Issue

I am trying to make a system where it swaps your character with another player’s character.
When cloning the player, the code runs perfectly fine, but instead of swapping the actual character it just makes a clone of said character. I have looked on the DevHub but to no avail. Here is the swap code (Located in “Script”):

image

this is the localscript at gets the targeted player from the GUI (its getting the .Name since I made another script rename the playerframe to the target player’s name) and triggers a remote event which is picked up by the “Script” which handles the server side cloning.

This code was working perfectly when I was searching for a random player in the server.

Thanks in advance kind stranger :smiley:

The problem is you are changing the variable “oldChar” instead of the character property of the player

The program did exactly as you asked of it. You simply cloned and placed player2's character at player1's position.

To actually change your character, you need to update the Player.Character property. You can also just apply player2's HumanoidDescription.

oh my god its always the most stupid mistakes