Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Player Cloning makes my character not move?

Asked by 6 years ago
Edited 6 years ago

Cloning my player with this script makes my player, it clones the player on the same plane as the original.

CloneVarGlobal = game.ReplicatedStorage.CloneVarGlobal

game.Players.PlayerAdded:connect(function(player)
  wait(1)
local char = player.Character
    char.Archivable = true
    CharacterClone = player.Character:Clone()
    CharacterClone.Parent = game.ServerStorage
    CharacterClone.Animate:Destroy()
    CharacterClone.Parent = workspace
    CloneVarGlobal:Fire(CharacterClone)
    local Weld = Instance.new("Weld")
    CharacterClone.Torso.CFrame = player.Character.Torso.CFrame * CFrame.new(0,0,3)
    Weld.Part0 = player.Character.Torso
    Weld.C0 = player.Character.Torso.CFrame:inverse()
    Weld.Part1 = CharacterClone.Torso
    Weld.C1 = CharacterClone.Torso.CFrame:inverse()
    Weld.Parent = CharacterClone
end)

Answer this question