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

Why wont the horizontal gun recoil work?

Asked by 9 years ago
local cam_rot = cam.CoordinateFrame - cam.CoordinateFrame.p
local siderecoil = math.random(-set.Recoil,set.Recoil) -- is there something wrong?
local cam_scroll = (cam.CoordinateFrame.p - cam.Focus.p).magnitude
local ncf = CFrame.new(cam.Focus.p) * cam_rot * CFrame.fromEulerAnglesXYZ(set.Recoil, siderecoil, 0) -- erm here?
cam.CoordinateFrame = ncf*CFrame.new(0, 0, cam_scroll)

Did I use a randomizer wrong or something? Please help! I have no clue why this wont work.

0
I got the script lines off some random gun and modified it so it can be used for the fps game im working on. supermarioworld323 45 — 9y

Answer this question