How to I make my first person gun script snappier?
SCRIPT:
01 | local player = game.Players.LocalPlayer |
02 | local char = player.Character |
03 | local cam = workspace.Camera |
04 | local arms = game.ReplicatedFirst.Arms:Clone() |
05 | local MyGun = script.Parent |
06 | local GunHandle = MyGun:WaitForChild( "Handle" ) |
08 | local Humanoid = arms.Humanoid |
09 | local IdleAnimation = script.IdleAnim |
10 | local ShootingAnimation = script.ShootAnim |
11 | local ShootAnimTrack = Humanoid:LoadAnimation(ShootingAnimation) |
12 | local IdleAnimTrack = Humanoid:LoadAnimation(IdleAnimation) |
14 | local mouse = player:GetMouse() |
16 | mouse.Button 1 Down:Connect( function () |
18 | game.ReplicatedStorage.Shoot:FireServer(mouse.Hit.p) |
21 | game:GetService( "RunService" ).Stepped:Connect( function () |
23 | arms:SetPrimaryPartCFrame(cam.CFrame * CFrame.new( 0 ,- 2 ,- 2.5 ) * CFrame.Angles( 0 , 0 , 0 )) |
I am trying to make a gun script and it works, but the issue is that when you turn the camera, it looks clunky and it stutters. Is there any way I can make it more snappy?