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

Arms of dummy falls off, Why?

Asked by 4 years ago

I have a script where it makes a dummy. But its arms keep falling off for some reason Heres the code

function makedummy(makejointoption)

    local dummy = Instance.new("Model",workspace)
    local larm = Instance.new("Part",dummy)
    local rarm = Instance.new("Part",dummy)
    local lleg = Instance.new("Part",dummy)
    local rleg = Instance.new("Part",dummy)
    local head = Instance.new("Part",dummy)
    local torso =Instance.new("Part",dummy)
    local rootpart =Instance.new("Part",dummy)
    local humanoid = Instance.new("Humanoid",dummy)



local generalsize = Vector3.new(1,2,1)
larm.Size = generalsize
rarm.Size = generalsize
rleg.Size = generalsize
lleg.Size = generalsize
torso.Size = Vector3.new(2,2,1)
rootpart.Size = Vector3.new(2,2,1)
    head.Size = Vector3.new(2,1,1)
    dummy.PrimaryPart = rootpart

    rarm.Position = Vector3.new(1.5,5,0)
    rleg.Position = Vector3.new(0.5, 3, 0)
    lleg.Position = Vector3.new(-0.5, 3, 0)
    larm.Position = Vector3.new(-1.5,5,0)
    head.Position = Vector3.new(0, 6.5, 0)
    torso.Position = Vector3.new(0,5,0)
    rootpart.CFrame = torso.CFrame
    local rootweld = Instance.new("Weld",rootpart)
    rootweld.Part0 = torso
    rootweld.Part1 = rootpart
    rootweld.C1 = torso.CFrame
    --naming the donkey who doesn't hear well
    larm.Name = "Left Arm"
    lleg.Name= "Left Leg"
    rleg.Name= "Right Leg"
    rarm.Name= "Right Arm"
    head.Name= "Head"
    torso.Name= "Torso"
    rootpart.Name= "HumanoidRootPart"
    humanoid.MaxHealth = math.huge
    humanoid.Health = math.huge
 rootpart.Anchored = true
    torso.Anchored = true
if makejointoption == true then
        dummy:MakeJoints()
    else
        print ("Dummy has no joints")
    end
end
makedummy(true)

I tried :MakeJoints on the dummy model but still nothing worked.

1
Try anchoring the arms string_byte 46 — 4y
0
I need a dummy that moves if the limbs are anchored then the dummy wont move also the legs fall off too antoniorigo4 117 — 4y
0
Never mind i had to painfully make motor6d joints. antoniorigo4 117 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago
local neck = Instance.new("Motor6D",torso)
neck.Part0 = torso
neck.Part1 = head
neck.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
neck.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
local jrarm = Instance.new("Motor6D",torso)
jrarm.Part0 = torso
jrarm.Part1 = rarm
jrarm.C1 = CFrame.new(-0.5, 0.5, 0, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08
)
jrarm.C0 = CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08)

local jlarm = Instance.new("Motor6D",torso)
jlarm.Part0 = torso
jlarm.Part1 = larm
jlarm.C1 = CFrame.new(0.5, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
jlarm.C0 = CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
local jlleg = Instance.new("Motor6D",torso)
jlleg.Part0 = torso
jlleg.Part1 = lleg
jlleg.C1 =  CFrame.new(-0.5, 1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
jlleg.C0 =  CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)

local jrleg = Instance.new("Motor6D",torso)
jrleg.Part0 = torso
jrleg.Part1 = rleg
jrleg.C1 =  CFrame.new(0.5, 1, 0, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08)
jrleg.C0 =  CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08)

local rootweldiorion = Instance.new("Motor6D",rootpart)
rootweldiorion.Part0 = rootpart
rootweldiorion.Part1 = torso
rootweldiorion.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
rootweldiorion.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
jrarm.Name = "Right Shoulder"
jlleg.Name = "Left Hip"
jlarm.Name = "Left Shoulder"
jrleg.Name = "Right Hip"
rootweldiorion.Name = "Root Hip"
neck.Name = "Neck"

Just had to make motor6d joints

Ad

Answer this question