I am attempting to get the bullet to go directly from the barrel to the mouse position without offsetting laterally.
What is the issue? Include screenshots / videos if possible!
When the bullet spawns, it immediately offsets horizontally, making the effect really strange.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I did look for solutions on the developer hub, to no avail. I tried increasing and decreasing the velocity. For some reason, slower velocity has less of an effect, and higher velocity has a more extreme effect. I would like a fast velocity without the offset.
My script sets the CFrame of the bullet using bullet.CFrame=CFrame.new(tool.barrel.Position,mouse.Hit.p)
The bullet then has a LinearVelocity inside of it to go forward at a set velocity.
If you look closely, the bolt starts at the correct barrel position, but the physics seems to veer it off to the side before going on the correct course.
Might have something to do with LinearVelocity if that’s the case I would try to recenter the attachment to ensure the expected movement of the part. Otherwise, the attachment will determine the movement and the results may not meet your expectations.