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

Why does this not work?

Asked by 8 years ago

Basically what i am trying to do is clone the torso in its exact position and rotation over and over.

local faak = Instance.new ("Part")
faak.Parent = game.Workspace
faak.Name = "Zhet"
faak.Size = Vector3.new(1,2,1)
faak.Position = CFrame.fromEulerAnglesXYZ("Left Leg")
faak.Rotation = CFrame.fromEulerAnglesXYZ("Left Leg")
faak.Anchored = true
faak.CanCollide = false
while true do
    game.Workspace.Zhet:clone()
    wait(1)
    game.Workspace.Zhet:clone()
    wait(1)
end

1 answer

Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
8 years ago

You're using clone correctly, but not parenting it! When you :clone(), it copies the object, but sets the new one's parent as nil! Therefore, you need to parent it!

game.Workspace.Zhet:clone().Parent = game.Workspace
Ad

Answer this question