I’m currently making a system where you can hold 1 tool and other tool in your left hand (this is mainly done for animation purposes). However, I’m unable to make the tool’s rotate correctly.
here is how it looks like:
I’ve tried changing the weld CFrame and pivoting the actual model but none works it stays like this regardless of what I do.
here is the code responsible for this part:
local Spoon = PlayerScripts.Animations:FindFirstChild("Spoon")
local Motor6 = Instance.new("Weld",Character.LeftHand)
Motor6.Name = "ToolGrip"
Tool.Activated:Connect(function()
print(1)
Spoon.Parent = Character.LeftHand
Motor6.Part0 = Character.LeftHand
Motor6.Part1 = Spoon.BodyAttach
--Motor6.C1 = Spoon:GetPivot() * CFrame.Angles(math.rad(180),0,0) -- Doesn't work
Spoon:PivotTo(Spoon:GetPivot() * CFrame.Angles(math.rad(180),0,0)) -- Doesn't work either
AnimeTrack:Play()
AnimeTrack.Stopped:Wait()
Spoon.Parent = PlayerScripts.Animations
end)
Hmm ok, but I still dont understand why you dont use a real Motor6D instead of a Weld…
And another big tip, dont set the parent of an Instance.new in the 2nd argument. Its really not optimal. You should just do instance.Parent = parent
Oh I found it. You cant set the pivot of the the tool since its welded!
Instead of doing Spoon:PivotTo()
Do weld.C1.CFrame = …
Because a weld takes full control over the tools CFrame. Therefore trying to force its CFrame to move will not work. But you can go with the weld and changes its C1 CFrame so the weld puts it into the place it wants.