How would i implement recoil to the viewmodel itself a little like this using spring module. I’ve tried a few times but i can’t seem to get the viewmodel to budge.
1 Like
Something like
local recoilCF = CFrame.new() --Track the recoil separately
function shoot()
recoilCF *= CFrame.new(0, 0.1, 0) * CFrame.Angles(-0.05,0,0)
end
function updateViewmodel(dt) --Call each frame
recoilCF = recoilCF:Lerp(CFrame.new(), dt * 5.5) --Decay recoil over time
viewmodel:PivotTo(camera.CFrame * recoilCF)
end
2 Likes
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.