Hello im trying to make aimdown sight for my tool but its not working i dont have any idea why it isn’t working
so basically im using pointToObjectSpace but when i trigger it nothing happens any idea?
heres the script
local swayAMT = -0.5
local aimSwayAMT = 0
local currentSwayAMT = 0
local aimCF = CFrame.new()
local Aiming = false
local AimPart = gun:WaitForChild("AimPart")
RunService.RenderStepped:Connect(function()
if Aiming then
local offset = Camera.CFrame:pointToObjectSpace(AimPart.Position)
aimCF = aimCF:Lerp(CFrame.new(offset), 0.035)
currentSwayAMT = aimSwayAMT
else
local offset = Vector3.new()
aimCF = aimCF:Lerp(CFrame.new(offset), 0.035)
currentSwayAMT = swayAMT
end
end)
and heres when it gets triggered
mouse.Button2Down:Connect(function()
if equiped then
Aiming = not Aiming
print("Aiming")
end
end)