What I’m trying to do is making it so that the camera goes to the part to act as aiming down sights. However it doesn’t go to the part properly and instead just does this.
This is the codeblock
RunService.RenderStepped:Connect(function()
workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame:ToWorldSpace(Offset.Value)
local HandleTransform = ToolHandle.CFrame:ToObjectSpace(ToolHandle.CFrame)
local OGTransform = HandleTransform * HandleTransform:Inverse()
local AimTransform = ToolHandle.CFrame:ToObjectSpace(GunParts.ADSPoint.CFrame) * HandleTransform:Inverse()
if M2Held then
Offset.Value = AimTransform
else
Offset.Value = OGTransform
end
end)
Now I’m also not sure if this approach is optimal or not, so I would love to hear any other methods