Bullets do circles in air

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? I want bullets to dont do circles

  2. What is the issue? bullets do circles when fired when i quickly change move direction when shooting and no shift lock

  3. What solutions have you tried so far? everything that comes to my mind

event2.OnServerEvent:Connect(function(plr, mPos)
	local bullet = bullet:Clone()

	bullet.Script.Disabled = false	
	local attachment0 = Instance.new("Attachment")
	bullet.Beam.Attachment0 = attachment0
	
	bullet.LinearVelocity.Enabled = true
	bullet.WeldConstraint:Destroy()
	
	bullet.CFrame = CFrame.new(tool.Model.Barell.Position)
	bullet.CFrame = CFrame.new(bullet.Position, mPos)

	
	
	attachment0.Parent = game.Workspace.Baseplate
	attachment0.WorldPosition = tool.Model.Barell.Position
	bullet.Parent = game.Workspace
	bullet.Transparency = 0
	wait(2.5)
	if bullet.Beam then
		bullet.Beam.Attachment0:Destroy()
		bullet:Destroy()
	end
	
end)
2 Likes

It’s actually a bug I believe, so use body velocity. It’s the same thing, but you don’t have to create an attachment and change VectorVelocity to Velocity

1 Like

true the replacement for body velocity needs attachments and it has a huge delay before it does its velocity correctly

isnt it deprecated i mean like outdated

1 Like

also is there a way to set body velocity to plane like it allways go forward?
like idk to make it go to mouse direction
sry for dealy but i werent able to write back

yes but it doesnt mean its not faster at loading
plus my expirience with the new ones are just that it has more force
anything else just sucks
it needs to have a attachment and it has a huge delay before they even work correctly

but how to make it go towards mouse point cause now i dont have the “plane” mode

what do you mean plane mode?
what does plane mode exactly do either way?

well plane mode for velocity allowed me to just rotate part with cframe to point mouse direction now idk how to make bullet go straight way to mouse.hit.p with vector 3

Use body position then
(Similar with AlignPosition)

what do you mean

breh characters limit

Bodypoisition is a disabled velocity (kind of) its just hidden and needs to be added by scripts now.

Instance.new("BodyPosition",script)

Run this in a script then test and copy what it comes out paste it and edit it.
(you can delete the script after)

Actually, VectorForce is the preferred method. You would add two to your bullet. Take a look at my answer here for an explanation on how to do this.

yeah but it isn’t removed so u gotta do whatcha gotta do

sry for dealy i was a sleep ima test it when ill have time thx for help oh yeah why i havent thought about disabling gravity with vector force y = gravity

stuff works better and less laggy but bullet still circles i think only way is to prevent it form spinning by making it unable to rotate by itself but idk how to

You can adapt the code that I posted for movement as well. Does the bullet itself spin? Or does the bullet follow a circular trajectory instead of flying straight?

To adapt the code, you would change these two lines:

force.Name = "FloatForce"
force.Force = Vector3.new(0, part:GetMass() * workspace.Gravity, 0)

To look something like this:

force.Name = "MoveForce"
vector = (target.Position - HumanoidRootPart.Position).Unit
force.Force = vector * velocity

I might have the target and the HRP reversed, but I will leave that as an exercise for you to solve on how to get those. Don’t have velocity too high though…200 or so max because the engine won’t handle it properly. If you need more speed than that, it’s best to use a raycast to see where it hits and weld a bullet to that location.

trajectory its like it do big circles or move out of straight way

In your original code, I see this:

So which one is it? Are you trying to combine them? Something like this perhaps?

bullet.CFrame = CFrame.new(tool.Model.Barell.Position * bullet.Position, mPos)

I see that you are using LinearVelocity. I think if that’s not even, you will get a curved trajectory. But there’s nothing in the code that you posted that shows where the actual assignment of values are being made.