How to make a stretching first person arm

I’m trying to replicate a system where your arm streches to act as a first person viewmodel, the game “a dusty trip” uses a system similar to this to handle grabbing items or using the steering wheel on vehicles.

Although I have no idea how to achieve this.

video referance:

2 Likes

Just use a viewportmodel with a very long arm.

1 Like

Hello! I made a copy of this system a few months ago, I used CFrame.lookAt and a bit of math, here’s code:

        local pos1 = self.ArmAttachment.WorldPosition
        local pos2 = self.Object.CFrame:ToWorldSpace(self.Offset).Position
        self.Arm.Size = Vector3.new(Constants.ARM_SIZE, Constants.ARM_SIZE, (pos2 - pos1).Magnitude + 1)
        self.Arm.CFrame = CFrame.lookAt((pos1 + pos2) / 2, pos2) 

You can see my code and download uncopylocked .rbxl place in the link, I’ll attach it below.