What is the problem with my gun firing script? (New problem found...)
07 | local cam = workspace.CurrentCamera |
08 | local barral = tool.Barrel |
09 | local bullets = tool.rounds.Value |
13 | local bullet = Instance.new( "Part" ) |
14 | bullet.Name = "Bullet" |
15 | bullet.CFrame = CFrame.new(barral.CFrame) |
16 | bullet.Velocity = Vector 3. new( 100 , 0 , 0 ) |
17 | bullet.Size = Vector 3. new( 0.5 , 0.5 , 1.5 ) |
19 | bullet.Touched:connect( function (hit) |
20 | local ALIEN = hit.Parent.FindFirstChild( "alien" ) |
21 | alien:TakeDamage(damage) |
32 | function onKeyDown(key) |
34 | cam.CameraSubject = tool.looksight |
35 | cam.CameraType = custom |
36 | elseif key = = "e" then |
37 | game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid |
38 | game.Workspace.CurrentCamera.CameraType = "Custom" |
41 | tool.Activated:connect(shots) |
so i got help on that, but now, the output says:
14:19:33.240 - Players.Player1.Backpack.turret.LocalScript:16: bad argument #1 to 'new' (Vector3 expected, got userdata)
14:19:33.244 - Script 'Players.Player1.Backpack.turret.LocalScript', Line 16
14:19:33.247 - Stack End