Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how to change wielding position?

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.

1 comment

0

hold on i will help 1 sec

1 answer

✓ Accepted answer
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.

2 comments

0

so just change the weld cframe not the part

0

also "fromEulerAnglesXYZ" was for me to rotate my part

This discussion is preserved as it was. New answers, comments, and votes are closed.