So I was watching Friaza's tutorial on how to make a basic gun. Everything works fine, except my bullets won't move when they're fired. Here's what I've got so far:
Player = game.Players.LocalPlayer
Gun = script.Parent
Ammo = 5
Mouse = Player:GetMouse()
velocityarg = math.huge
function Shoot()
if Ammo > 0 then
Bullet = Instance.new("Part",workspace)
game.Debris:AddItem(Bullet, 2)
Bullet.Size = Vector3.new(0.6, 0.2, 0.6)
Bullet.TopSurface = "Smooth"
Bullet.BottomSurface = "Smooth"
Bullet.BrickColor = BrickColor.new(Player.Color.Value)
Bullet.CanCollide = false
Bullet.CFrame = Gun.Handle.CFrame
Bullet.CFrame = CFrame.new(Bullet.Position, Mouse.Hit.p)
Velo = Instance.new("BodyVelocity",Bullet)
Velo.velocity = Bullet.CFrame.lookVector * 90
Velo.maxForce = Vector3.new(math.huge,math.huge,math.huge)
end
end
Gun.Activated:connect(Shoot)
Nothing's showing up in the output. Any idea why it's not working?

1 comment
The default for created parts is that they're unanchored. However, you might want to try setting that property just to make sure.