The bullet just doesn't go the direction the players mouse is but it just spawns the bullet.
Player = game.Players.LocalPlayer Gun = script.Parent Ammo = 5 mouse = Player:GetMouse() function Shot(test) if Ammo > 0 then Bullet = Instance.new("Part", Workspace) game.Debris:AddItem(Bullet, 2) Bullet.Shape = "Ball" Bullet.Size = Vector3.new(0.1, 0.1, 0.1) Bullet.TopSurface = "Smooth" Bullet.BottomSurface = "Smooth" Bullet.BrickColor = BrickColor.new("Lime green") Bullet.CanCollide = false Bullet.CFrame = Gun.Handle.Cframe Bullet.CFrame = CFrame.new(Bullet.Position,mouse.Hit.p) BM = Instance.new("SpecialMesh", Bullet) BM.MeshType = "Sphere" BM.Scale = Vector3.new(0.2, 0.2, 0.2) v = Instance.new("BodyVelocity", Bullet) v.velocity = Bullet.CFrame.lookVector *90 v.maxForce = Vector3.new(math.huge, math.huge, math.huge) FireSound = Instance.new("Sound", Bullet) FireSound.SoundId = "http://www.roblox.com/asset/?id=161875506" RP = math.random(60,80) RP = RP /10 FireSound.Pitch = RP RV = math.random(70, 90) RV = RV /10 FireSound.Volume = RV FireSound:Play() game.Debris:AddItem(FireSound, 2) end end Gun.Activated:connect(Shot)
It looks to me as if your bullet might still be anchored.
Player = game.Players.LocalPlayer Gun = script.Parent Ammo = 5 mouse = Player:GetMouse() function Shot(test) if Ammo > 0 then Bullet = Instance.new("Part", Workspace) game.Debris:AddItem(Bullet, 2) Bullet.Shape = "Ball" Bullet.Size = Vector3.new(0.1, 0.1, 0.1) Bullet.TopSurface = "Smooth" Bullet.BottomSurface = "Smooth" Bullet.BrickColor = BrickColor.new("Lime green") Bullet.CanCollide = false Bullet.Anchored = false --You did not add this. Bullet.CFrame = Gun.Handle.Cframe Bullet.CFrame = CFrame.new(Bullet.Position,mouse.Hit.p) BM = Instance.new("SpecialMesh", Bullet) BM.MeshType = "Sphere" BM.Scale = Vector3.new(0.2, 0.2, 0.2) v = Instance.new("BodyVelocity", Bullet) v.velocity = Bullet.CFrame.lookVector *90 v.maxForce = Vector3.new(math.huge, math.huge, math.huge) FireSound = Instance.new("Sound", Bullet) FireSound.SoundId = "http://www.roblox.com/asset/?id=161875506" RP = math.random(60,80) RP = RP /10 FireSound.Pitch = RP RV = math.random(70, 90) RV = RV /10 FireSound.Volume = RV FireSound:Play() game.Debris:AddItem(FireSound, 2) end end Gun.Activated:connect(Shot)