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

Can anyone tell me why this isn't working?(Its a Gun Firing Script)

Asked by
faruque 30
10 years ago
Player = game.Players.LocalPlayer
Gun = script.Parent
mouse = Player:Getmouse()
function Shoot()
    Bullet = Instance.new("Part", Workspace)
    game.Debris:AddItem(Bullet,2)
    FormFactor = 'Custom'
    Bullet.Size = Vector3.new(0.2, 0.2, 2)
    BrickColor = BrickColor.new('Really red')
    Bullet.TopSurface= "Smooth"
    Bullet.BottomSurface= "Smooth"
    Bullet.CanCollide = false 
    Bullet.CFrame = Hole.Gun.CFrame
    Bullet.CFrame = CFrame.new(Bullet,Position,Mouse.Hit.p)
    V = Instance.new("BodyVelocity ", Bullet)
    V.Velocity = Bulllet.CFrame.lookVector *90
    V.maxfore = Vector3.new(math.huge,math.huge,math.huge)
end

Gun.Activated:connect(Shoot)
0
Thanks man!! faruque 30 — 10y

1 answer

Log in to vote
0
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
10 years ago

At line 17 in that code above, change V.maxfore to V.maxForce.

Ad

Answer this question