I have seen so many things about bullet drop but never seen how to do it with body velocity and either way the bullet is way too fast for close range combat when using the velocity property so how I go about making it go downwards because of gravity and lose forward speed overtime?
Don’t write whole scripts, just give an example with an explanation. Thank you for the help in advance.
Can I see your script please? It helps to figure our what’s wrong
local function Look_At(TiP, Position)
local face_direction = (Tip.CFrame.p - Position).unit
return CFrame.lookAt(Tip.CFrame.p - Vector3.new(0,0,2), Position)
end
newBullet.CFrame = Look_At(Tip.CFrame.p, Laser.Position)
local speed = (Laser.Position - Tip.CFrame.p).Unit * 600
newBullet.Velocity = speed -- to fast but vector force won't work
local function HitScan()
Hitscan_Params.FilterDescendantsInstances = {newBullet, part, BulletHole, Folder}
Hitscan_Params.FilterType = Enum.RaycastFilterType.Blacklist
local Scan_Orgin = newBullet.CFrame.p
local Scan_Direction = newBullet.CFrame.LookVector * 1.05 * newBullet.Size.Z + newBullet.CFrame.RightVector * 1.05 + newBullet.CFrame.RightVector * -1.05
local Scan = workspace:Raycast(Scan_Orgin, Scan_Direction, Hitscan_Params)
if Scan then
local Scan_part = Scan.Instance
if Scan_part then
Debris:AddItem(newBullet, .001)
--print(Scan_part)
local HitHumanoid = Scan_part.Parent:FindFirstChildWhichIsA("Humanoid") or Scan_part.Parent.Parent:FindFirstChildWhichIsA("Humanoid")
if HitHumanoid then
HitHumanoid:TakeDamage(17)
end
end
end
if Scan then
Debris:AddItem(newBullet, .001)
BulletHole = Instance.new("Part", Folder)
BulletHole.Name = ("Bullet Hole")
BulletHole.Shape = Enum.PartType.Ball
BulletHole.Color = Color3.fromRGB(2, 47, 225)
BulletHole.CanCollide = false
BulletHole.Anchored = true
BulletHole.Material = Enum.Material.SmoothPlastic
BulletHole.CFrame = CFrame.new(Scan.Position)
BulletHole.Size = Vector3.new(0.5,0.5,0.5)
Debris:AddItem(BulletHole, 0.25)
end
end
RunService.Heartbeat:Connect(function()
HitScan()
end)
local speed = (Laser.Position - newBullet.CFrame.p).Unit * 100
local dropAngle = 0
--local newspeed = CFrame.new(newBullet.CFrame * CFrame.new(0, 0, -500) * CFrame.Angles(-dropAngle, 0, 0))
local BV = Instance.new("BodyVelocity", newBullet)
BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
BV.P = 50
BV.Velocity = speed + Vector3.new(0,-4,0) -- tried body velocity with velocity of 100 and -4 for bullet from but some bullets still go through the part
BodyVelocity are kind of the exact opposite of what you want no?
Have you tried using BodyForce?
I just to be able to have a Smooth bullet without it being too fast nor too slow so it won’t go through objects and so you can see it for the effect.
Vector force is what I want but it won’t go where I want it to go.
BodyVelocity attempts to maintain a velocity.
If you are trying to create a bullet drop, you have to change the velocity on a loop.
How would vector force work since I tried using it but it did not work: VectorForce not going towards mouse position
How would I create bullet drop and change the velocity in a loop ?