Character clone is considered a player

I am making a clone of my character by setting archived to true, cloning and then false.
The clone works well, but when i try to use game.Players:GetPlayers(), the clone is considered a player and it goes to that array.
I want a way to get a clone of my character without that bug.
I searched up for solutions here but can’t find one.

This is the clone creation part of the script(server script)
When a player presses C, it fires a remote event that is received from this script
It spawns a character clone in front of the actual character and set it health to 25

player.Character.Archivable = true
local clone = player.Character:Clone()
player.Character.Archivable = false
clone.Parent = workspace
clone.PrimaryPart.CFrame = player.Character.PrimaryPart.CFrame:ToWorldSpace(CFrame.new(0, 0, -2))
clone.Humanoid.MaxHealth = 25
1 Like

I’m not sure how cloning the character would create a second player object? Maybe you can create a folder in the Workspace that will hold the clones?

it doesnt create a second player object, if i go to the players service, there is only one player(in client and server), but when i use GetPlayers or GetChildren, it returns a object outside the Players service(the clone). I already tried to parent the clone to some folder in the workspace, if that is what you are suggesting, sorry for the late reply

1 Like

Thanks for trying to help me, but i found a solution. Instead of cloning the character, i cloned an existing rig and cloned just the shirt, pants, accessories, shirt graphic and the face from my character, now it doesnt have that bug.

1 Like

Glad to see you could figure out a way around the problem you were facing. :GetPlayers() will only return a table of player objects, which you can get their characters via player.Character.

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