I have a script where I can ads but when the player moves while ads 'ing it does not follow the camera part but stays locked until they let go of the button here is a video
here is my local script in startercharacterscripts
local mouse = game.Players.LocalPlayer:GetMouse()
local plr = game.Players.LocalPlayer
local cam = workspace.CurrentCamera
local tweenService = game:GetService("TweenService")
game:GetService("UserInputService").InputBegan:Connect(function(input, gameprocessedevent)
if input.KeyCode == Enum.KeyCode.Q then
local gun = plr.Character.Gun
local aimpart = gun.AimPart
local tweenInfo = TweenInfo.new(
0.7,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
0
)
local properties = {
CFrame = aimpart.CFrame
}
cam.CameraType = Enum.CameraType.Scriptable
local tween = tweenService:Create(cam, tweenInfo, properties)
tween:Play()
game:GetService("UserInputService").InputEnded:Connect(function(input)
if input.KeyCode == Enum.KeyCode.Q then
wait()
local tweenIfo = TweenInfo.new(
0.7,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
0 )
local propsmoveback = {
CFrame = script.Parent:FindFirstChild("Head").CFrame
}
local tween2 = tweenService:Create(cam, tweenIfo, propsmoveback)
tween2:Play()
cam.CameraType = Enum.CameraType.Custom
end
end)
end
end)```
any help is appreciated thanks in advance!