Josiahiscool73

Clone Script

Jan 19th, 2026 (edited)
81
0
Never
6
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 KB | None | 0 0
  1. -- this will let u play animations without dying and this works fine u can put like your real character somewhere in the distance on a baseplate frozen and use your real character to fling or sum
  2.  
  3.  
  4. local Players = game:GetService("Players")
  5.  
  6. local player = Players.LocalPlayer
  7. local character = player.Character or player.CharacterAdded:Wait()
  8. local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
  9.  
  10. local CLONE_DISTANCE = 5
  11.  
  12. local myClone = nil
  13.  
  14. local function createDummy()
  15. local dummy = Instance.new("Model")
  16. dummy.Name = "Clone"
  17.  
  18. local hrp = Instance.new("Part")
  19. hrp.Name = "HumanoidRootPart"
  20. hrp.Size = Vector3.new(2, 2, 1)
  21. hrp.Transparency = 1
  22. hrp.CanCollide = false
  23. hrp.Parent = dummy
  24.  
  25. local humanoid = Instance.new("Humanoid")
  26. humanoid.Parent = dummy
  27.  
  28. local function createPart(name, size)
  29. local part = Instance.new("Part")
  30. part.Name = name
  31. part.Size = size
  32. part.TopSurface = Enum.SurfaceType.Smooth
  33. part.BottomSurface = Enum.SurfaceType.Smooth
  34. part.CanCollide = false
  35. part.Parent = dummy
  36. return part
  37. end
  38.  
  39. local head = createPart("Head", Vector3.new(2, 1, 1))
  40.  
  41. local headMesh = Instance.new("SpecialMesh")
  42. headMesh.MeshType = Enum.MeshType.Head
  43. headMesh.Scale = Vector3.new(1.25, 1.25, 1.25)
  44. headMesh.Parent = head
  45.  
  46. local torso = createPart("Torso", Vector3.new(2, 2, 1))
  47. local leftArm = createPart("Left Arm", Vector3.new(1, 2, 1))
  48. local rightArm = createPart("Right Arm", Vector3.new(1, 2, 1))
  49. local leftLeg = createPart("Left Leg", Vector3.new(1, 2, 1))
  50. local rightLeg = createPart("Right Leg", Vector3.new(1, 2, 1))
  51.  
  52. local function createMotor(name, part0, part1, c0, c1)
  53. local motor = Instance.new("Motor6D")
  54. motor.Name = name
  55. motor.Part0 = part0
  56. motor.Part1 = part1
  57. motor.C0 = c0
  58. motor.C1 = c1
  59. motor.Parent = part0
  60. return motor
  61. end
  62.  
  63. createMotor("Neck", torso, head, CFrame.new(0, 1, 0), CFrame.new(0, -0.5, 0))
  64. createMotor("Left Shoulder", torso, leftArm, CFrame.new(-1, 0.5, 0), CFrame.new(0.5, 0.5, 0))
  65. createMotor("Right Shoulder", torso, rightArm, CFrame.new(1, 0.5, 0), CFrame.new(-0.5, 0.5, 0))
  66. createMotor("Left Hip", torso, leftLeg, CFrame.new(-0.5, -1, 0), CFrame.new(0, 1, 0))
  67. createMotor("Right Hip", torso, rightLeg, CFrame.new(0.5, -1, 0), CFrame.new(0, 1, 0))
  68. createMotor("Root Joint", hrp, torso, CFrame.new(0, 0, 0), CFrame.new(0, 0, 0))
  69.  
  70. local face = Instance.new("Decal")
  71. face.Name = "face"
  72. face.Texture = "rbxasset://textures/face.png"
  73. face.Parent = head
  74.  
  75. dummy.PrimaryPart = hrp
  76.  
  77. return dummy
  78. end
  79.  
  80. local function cloneCharacter()
  81. if not player.Character then
  82. return nil
  83. end
  84.  
  85. character = player.Character
  86. humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
  87.  
  88. if not humanoidRootPart then
  89. return nil
  90. end
  91.  
  92. local humanoid = character:FindFirstChildOfClass("Humanoid")
  93. if not humanoid then
  94. return nil
  95. end
  96.  
  97. local clone = createDummy()
  98. if not clone then
  99. return nil
  100. end
  101.  
  102. local cloneRoot = clone:FindFirstChild("HumanoidRootPart")
  103. if cloneRoot then
  104. cloneRoot.CFrame = humanoidRootPart.CFrame * CFrame.new(0, 0, -CLONE_DISTANCE)
  105. end
  106.  
  107. clone.Parent = workspace
  108.  
  109. local success, desc = pcall(function()
  110. return humanoid:GetAppliedDescription()
  111. end)
  112.  
  113. if success and desc then
  114. local cloneHumanoid = clone:FindFirstChildOfClass("Humanoid")
  115. if cloneHumanoid then
  116. pcall(function()
  117. cloneHumanoid:ApplyDescription(desc)
  118. end)
  119. end
  120. end
  121.  
  122. return clone
  123. end
  124.  
  125. wait(0.5)
  126. myClone = cloneCharacter()
  127.  
  128. player.CharacterAdded:Connect(function(newChar)
  129. character = newChar
  130. humanoidRootPart = character:WaitForChild("HumanoidRootPart")
  131. if myClone and myClone.Parent then
  132. myClone:Destroy()
  133. myClone = nil
  134. end
  135. wait(1)
  136. myClone = cloneCharacter()
  137. end)
Advertisement
Comments
Add Comment
Please, Sign In to add comment