First Person sway making it hard for me to figure out how to do Aim Down Sights

Hey There! I hope you checked this post without looking at the bad name of the post, as I couldn’t figure out a way to name this, but I currently have been working on my First Person weapons, and I finally made first person sway, as the GIF is here.

However, due to this, I currently can’t figure out how I’d do Aim Down Sights with this, as I am doing the sway by lerping the CFrame of the Arm’s position.

--//First Person Weapon Stuffs\\--
RunService.RenderStepped:connect(function()
local position = CFrame.new(Camera.CFrame.p)
    local startRotation = arms.Head.CFrame - arms.Head.CFrame.p
    local goalRotation = Camera.CFrame - Camera.CFrame.p
    local speed = 0.8 -- Between 0 and 1, lower causes more movement "lag"
    arms.Head.CFrame = position * startRotation:lerp(goalRotation, speed)
end)

However, my issue is how would i go around doing it, as this was the old script I had.

local function aimDownSights(aiming)
    local start = arms.Head.CFrame --I think this could work?
    local goal = aiming and arms.Head.CFrame * offset or CFrame.new()
    aimCount = aimCount + 1
    local current = aimCount
    for t = 0, 101, 10 do
        if (current ~= aimCount) then break end
        game:GetService("RunService").RenderStepped:Wait()
        arms.Head.CFrame = start:Lerp(goal, t/100)
    end
end

Some things I tried before was this, however trying to do this gets me into a situation where i have 2 renderstepped running for the Arms CFrame, which I don’t think would make this work (correct me in the comments below), as what could I do here?

If you could help, that’d be appreciated. :slight_smile:

1 Like

What you should do is have an aim-part, and change the camera subject to that aim-part. If you need examples of how this should work / or look like, let me know!

Hm, that’s exactly like what I posted here, however instead the thing is the fact that i do that, as I should’ve state that offset is actually this, which is essentially just doing it based off of aimpart.

local arms = game.ReplicatedStorage.Weapons.AR15:Clone()
local gun = arms.AR15Model
local offset = arms.gun.Handle.CFrame:inverse() * arms.gun.Aim.CFrame

However, If you could maybe? send in a snippet of what you stated, but I don’t think it’s the issue :frowning:

(and even when changing it a bit, this is what i get.)

A while back I was messing around with making security cameras and found that decreasing the players FOV made it look like it was zoomed in, hope this helps.