Issue
I am having trouble making an Aiming script for a Pistol I’ve made. I have an Aim Part and Handle for my Gun, I’m just not sure how to approach scripting the Aim function.
What I’ve Tried
I have been searching this up a lot to find answers, however they all linked to this one thread which had no help.
I worded what I was trying to say wrong. I’m trying to manipulate the Camera in some way to make it be the CFrame of the AimPart’s CFrame.
(I didn’t mean Zoom in and out)
For a nice zoom in/out effect, you can try using CFrame:lerp to tween the camera to the CFrame.
local s = camera.CFrame
local rs = game:GetService("RunService").RenderStepped
for i = 0, 100, 10 do
camera.CFrame = s:lerp(aimPart.CFrame, i/100)
rs:Wait()
end