Sorry if the title is kind of weird.
Anyways, I’m once again, attempting smooth recoil! I have a pretty nice camera spring module which functions perfectly fine.
The thing is, I want the camera to go back down after the player is done firing, and to do this, I lerp the camera cframe to the cframe from when they started firing, but this overrides the player’s choice. Is it possible to prevent that? Can I find the previous Y position from the camera?
My code:
orcCFrame = camera.CFrame --//Snapshot cframe
mouse.Button1Up:Connect(function()
if Firing == true then
Firing = false
for i = 0, 1, 0.2 do
wait()
camera.CFrame = camera.CFrame:Lerp(CFrame.new(0,orcCFrame,0), i)
runServ.RenderStepped:Wait()
end
end
end)
And please, don’t tell me to look into springs, I have decided that they’re too complex and just give me errors.
What I mean by overriding player choice, is that when I move my camera and stop firing, it makes me look to the previous camera CFrame
Any help would be appreciated!