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

How do I move this welded blade lower in my hand?

Asked by
Storche 13
4 years ago

I'm new to this kind of thing, and I'm trying to change the position of the dagger in my off-hand to get lower. However I don't know how to change it's position.

https://gyazo.com/492e17b72df41f0794295a596d814692

local rp = game.ReplicatedStorage
local LeftArm = rp:WaitForChild("LeftArm")

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:connect(function(char)
        local ClonedLA = LeftArm:Clone()
        ClonedLA.Parent = char
        ClonedLA.Grip2.CFrame = char:WaitForChild("Left Arm").CFrame

        local Weld = Instance.new("ManualWeld")
        Weld.Part0 = ClonedLA.Grip2
        Weld.Part1 = char:WaitForChild("Left Arm")
        Weld.C0 = ClonedLA.Grip2.CFrame:inverse() * char:WaitForChild('Left Arm').CFrame
        Weld.Parent = char:WaitForChild('Left Arm')

        end)
    end)
0
Well I would use a plugin if you are new to use the easy way out! Its very simple that way. JuzeyPlayz -83 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Play around with the Weld.C0 and Weld.C1 properties, though I'm sure you only have to use one of them.

In your code you used the Weld.C0 property; so what I would do is just add * CFrame.new(0, 0, 0) to the end of that line and play around with the numbers.

0
Oh damn hey I totally forgot that was a thing. Also do you mind if I ask another question? Isn't there some kind of CFrame.new but for angels? So I twist and turn the item? Storche 13 — 4y
0
Oh, sorry for replying late. Yes there is! Its called CFrame.Angles and it uses radians. So if you wanted to rotate a part 90 degrees on the y-axis, you would multiply your CFrame by CFrame.Angles(0, math.pi/2, 0) or CFrame.Angles(0, math.rad(90), 0). Feel free to DM me at Brandon#4128 on discord if you need any more help. Brandon1881 721 — 4y
Ad

Answer this question