Hey i’m making a sniper with a scope and i tried to change the camera CFrame to the place i wanted the scope, it worked but the problem is that i can’t move the camera anymore. Here is the script i made
UserInputService.InputBegan:Connect(function(Input, gameProcessedEvent)
if Input.KeyCode == Enum.KeyCode.Q and script.Parent.Parent == Player.Character then
Zooming = true
Camera.FieldOfView = 10
Player.Character.Humanoid.WalkSpeed = 10
RunService.Heartbeat:Connect(function()
if Zooming == true then
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = script.Parent.Scope.CFrame
end
end)
end
end)
UserInputService.InputEnded:Connect(function(Input, gameProcessedEvent)
if Input.KeyCode == Enum.KeyCode.Q and script.Parent.Parent == Player.Character then
Zooming = false
Camera.FieldOfView = 70
Player.Character.Humanoid.WalkSpeed = 16
Camera.CameraSubject = Player.Character.Humanoid
Camera.CameraType = "Custom"
Camera.CFrame = Player.Character.Head.CFrame
end
end)
Well i think i know one issue i think it’s beacuse the camera.CFrame always get set to the scope.CFrame each frame. But that’s not all if i don’t then the camera will fall behind and not follow the character. I’m wondering what should i do to make a sniper scope?