Finding the ideal grip for a Tool or interpreting Tool Grip

Some context:
At the moment, I am currently attempting to drinks to my project. I’m fine with generally getting functionality down, but I find that making a straight animation for drinking is not what I want. I’d like to use Grip to accompany the animation, but I’m really bad at working with Vectors and CFrames. For me, it’s more like a guess-and-check kind of problem. I was wondering if there was a better way to do this - I often forego editing Grip because I don’t want to work with math.

What I’d like to accomplish is this:
When the player takes a sip of their drink, an animation will play so that they hold it near their mouth. Once the animation reaches the keyframe where the cup is near the character’s mouth, the Grip will be modified so the cup tilts towards their mouth. After a few seconds, the Grip tilts back up away from their mouth and the animation finishes.

1 Like

The cleanest way I can imagine doing this is attaching the tool to a Motor6D on the player’s hand. This way, you can animate the tool too just as you would a character rig.

There’s a plugin called tool grip editor made by clonetrooper I think, it’s pretty cool but I am not sure if it works well nowadays cause it’s old.

2 Likes

Tool grip is very easy to understand for the most part. Tool.Grip is essentially a local offset from the character’s grip location. If you set it to CFrame.new(), it will have the same CFrame as the hand. If you want to adjust it in studio, you can try things such as: getting a cframe that is local to the hand and using that for Tool.Grip. Here is an example:

local current = rig.RightHand.CFrame
tool.Grip = current:toObjectSpace(tool.Handle.CFrame)

This should set the grip to the offset needed to achieve that CFrame. When the tool is used, it should have that same offset. The other tool grip properties are just parts of the Grip CFrame. GripFoward is the LookVector, GripRight is the RightVector, GripUp is the UpVector, and GripPos is the position. Roblox is also probably going to push an update to replace tool weld with a motor6d for the above solution.

3 Likes

@Extuls I’m aware that can be done. I don’t want to use that method here though. This is also not a toolless tool system, nor do I want the trouble of converting RightGrip to a Motor6D yet.

@RuizuKun_Dev Doesn’t answer my question. Already know how to use it but I’m not looking for an initial set. I need to know how to interpret Tool.Grip so that I can change it when the cup reaches the mouth in the animation.

@Wunder_Wulfe Thanks, I’ll experiment around.