1. What do you want to achieve?
I’m trying to create a perfectly centered ADS (Aim Down Sights) system.
2. What’s the issue?
The ADS view is always offset and never aligns with the center of the screen. I can’t figure out how to make it match the center properly.
3. What have you tried so far?
I’ve spent over 4 hours searching through almost every post related to aim down sights and experimenting in all kinds of ways, but nothing has worked.
Here’s a video showing the issue. The scope should be aligned to the exact center of the screen, but it appears too high instead:
This is the script written by someone I know who developed the gun kit I’m using:
local ads = cws.weapon:FindFirstChild("ADS") -- aim part
local mouse = Players.LocalPlayer:GetMouse()
local ray = cws.camera:ScreenPointToRay(mouse.X, mouse.Y, 0)
local offset = ads.CFrame:toObjectSpace(CFrame.new(ray.Origin, ray.Origin + ray.Direction)).Position
grip.C0 = cws.origin.grip_c0
TweenService:Create(
grip,
TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),
{C0 = grip.C0 * CFrame.new(offset.X,offset.Y,offset.Z)}
):Play()
Here’s a screenshot where I stretched the aim part to visually confirm its position:
I’m confident the issue is not caused by incorrect placement of the aim part, since I positioned it precisely at the lens of the scope.
If you help me, I’ll be able to start developing tomorrow with a joyful heart the moment I turn on my computer!
