Lean out of vehicle on weapon equipped

I want to make it so that whenever your in a vehicle and you equip a weapon then your character leans out of the vehicle so that they can shoot, and whenever the weapon is unequipped character goes back to it’s position and same happens when they leave the vehicle.
I don’t really know how to start, what I have in mind is changing humanoids root part position and rotation on weapon equipped and change it back when it’s unequipped or the player leaves the vehicle.

1 Like