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

how to change wielding position?

Asked by
Annon28 23
6 years ago
game:GetService("UserInputService").InputBegan:connect(function(inputobject,gameProcessedEvent)
    if inputobject.KeyCode == Enum.KeyCode.E then
        local party = Instance.new("Part")
        party.Size = Vector3.new(1,3,1)
        party.CanCollide = false
        party.Anchored = false
        party.Parent = game.Players.LocalPlayer.Character
        party.CFrame = game.Players.LocalPlayer.Character["Right Arm"].CFrame * CFrame.new(0,-8,2)
        local meshy = Instance.new("SpecialMesh")
        meshy.MeshId = "http://www.roblox.com/asset/?id=121944778"
        meshy.TextureId = "http://www.roblox.com/asset/?id=121944805"
        meshy.Parent = party
        local weld = Instance.new("Weld")
        weld.Parent = party
        weld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
        weld.Part1 = party
    end
end)

I weld a part on to my character right arm but i want to make it lower so it will look like the character hold it. i try to change the CFrame but i still didn't do the thing. Please help.

0
hold on i will help 1 sec Ind1v1duals 43 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
local we = Instance.new("Weld")
we.Parent = script.Parent.Parent.Parent.Character.RightUpperLeg
we.Part0 = part
we.Part1 = script.Parent.Parent.Parent.Character.RightUpperLeg
we.C0 = CFrame.new(.4, -0.5, .5)*CFrame.fromEulerAnglesXYZ(359.7, -2.9, 350.3)

The last line is how you would weld it, it is something from my own makings.

0
so just change the weld cframe not the part Ind1v1duals 43 — 6y
0
also "fromEulerAnglesXYZ" was for me to rotate my part Ind1v1duals 43 — 6y
Ad

Answer this question