Need help with BodyVelocity? S O S!
01 | Player = game.Players.LocalPlayer |
02 | Mouse = Player:GetMouse() |
03 | run = game:GetService( 'RunService' ) |
04 | Character = Player.Character |
10 | Part = Instance.new( "Part" , Character) |
11 | Part.FormFactor = "Custom" |
12 | Part.Size = Vector 3. new( 1.05 , 5.48 , 1.15 ) |
13 | Part.CanCollide = false |
14 | Part.BrickColor = BrickColor.new( "Black" ) |
15 | Weld = Instance.new( "Weld" , Character) |
16 | Weld.Part 0 = Weld.Parent [ "Right Arm" ] |
17 | Weld.C 0 = CFrame.Angles( 0 , 0 , 0 ) |
19 | Weld.C 1 = CFrame.Angles( 0 , 0 , 0 ) *CFrame.new( 0 , - 1 , 1 ) |
27 | if key = = "r" and enabled 1 = = true then |
30 | LOL = Instance.new( "Part" ,workspace) |
31 | LOL.Size = Vector 3. new( 3 , 3 , 3 ) |
32 | LOL.BrickColor = BrickColor.new( "Black" ) |
34 | LOL.CanCollide = false |
35 | LOL.Transparency = 0.5 |
36 | LOL.Name = Player.Name |
37 | LOL.CFrame = Character.Torso.CFrame*CFrame.new( 1 , 2 , - 5 ) |
38 | Fire = Instance.new( "Fire" ,LOL) |
41 | game.Debris:AddItem(LOL, 5 ) |
42 | Power = Instance.new( "BodyVelocity" ,LOL) |
43 | Power.Velocity = Character.Torso.CFrame.lookVector* 80 |
44 | Power.maxForce = Vector 3. new( math.huge , math.huge , math.huge ) |
47 | RS = Character.Torso [ "Right Shoulder" ] |
48 | RS.C 0 = RS.C 0 *CFrame.fromEulerAnglesXYZ( 0 , 0 , 0.20 ) |
52 | RS = Character.Torso [ "Right Shoulder" ] |
53 | RS.C 0 = RS.C 0 *CFrame.fromEulerAnglesXYZ( 0 , 0 , - 0.20 ) |
59 | Mouse.KeyDown:connect(sword) |
60 | Mouse.KeyDown:connect(onkey) |
Equips the bazooka when q is pressed, shoots when r is pressed.
The first shots works, but when I move around, it stops working and the bullets spawns infront of me...
Just test and see and u will understand what I mean..
Ty in advance!