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

Broken Cloning Code?

Asked by 9 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.

The Bottom cloning code is glitched The labeled part wont clone the pants into the Character Please help THX for reading!

wait(5)
target = Vector3.new(42, 0.5, -27)
target2 = Vector3.new(34, 0.5, -27)
while game.Players.NumPlayers < 1 do
         wait()
  end
 local Players = game.Players:GetPlayers()
    for i,v in pairs(Players) do
  v.Character.Torso.CFrame = CFrame.new(target2)
end

wait(5)

    while game.Players.NumPlayers < 1 do
        wait()
    end 
local Players = game.Players:GetPlayers()
  local Phantom = Players[math.random(#Players)]
    target = Vector3.new(42, 0.5, -27)
Phantom.Character.Torso.CFrame = CFrame.new(target)
PhantomHead = Phantom.Character.Head
for i, v in pairs(Phantom.Character:GetChildren()) do
     if v:IsA("Hat") then
    v:Destroy()
end
wait()
end
--Broken Section Here
local Kit = game.workspace._PhantomKit
local PhantomHat = Kit.PhantomBody.Hat
local PhantomMesh = PhantomHat.Mesh
local PhantomPants = Kit.PhantomBody.Pants
PhantomPants:Clone(Phantom.Character) -- Wont clone into the Phantoms character
Mesh = Instance.new("SpecialMesh")
PhantomHead.Mesh:Remove()
Mesh.MeshId = PhantomMesh.MeshId
Mesh.TextureId = PhantomMesh.TextureId
Mesh.Parent = PhantomHead
0
A while loop prevents the code from continuing. Even if it returns false, it'll keep attempting no matter what. Shawnyg 4330 — 9y
0
That is completely incorrect: `while false do end print("See?")` adark 5487 — 9y
0
@ioutrageous; what about the cloning is broken? Without a bit more explanation we can't really help you. adark 5487 — 9y

Answer this question