Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My gun script is working when I aim, but when I try to move camera while aiming, it doesent move???

Asked by 3 years ago

I made a gun script, and when I right click to aim, it works fine, but it wont let me move my camera while im aiming.

Problem: https://imgur.com/gallery/7MR5HR4

Script

local Gun = script.Parent.Parent.MusketTest
local AimPart = script.Parent.AimPart
local Main = script.Parent.Main

local Cam = game.Workspace.Camera

local Hum = game.Players:FindFirstChild("HumanoidRootPart")

Gun.Equipped:Connect(function(mouse)
    mouse.Button2Down:Connect(function()
        Cam.CameraSubject = Gun.AimPart
        Cam.CFrame = Gun.AimPart.CFrame * CFrame.Angles(0, 0, 0)
    end)
end)

Thank you for youre feedback!

0
Its bc ur changing the cameras cframe. try making an animation instead? acediamondn123 147 — 3y

Answer this question