Weld/weld constraint started to act weird recently, need help to fix it


how do I fix body velocity and linear velocity being just overall inaccurate when sped up. this is a photo of when I speed up the projectile with lookvector*100. the result is still the same even after converting to linear velocity projectiles appear gradually and shoot into the mouse location which is simply enough context. this problem is actually global and has happened to my friend aswell. I do not want to resort to a solution like gradually raycasting since it isnt very pleasant. are there any solutions for me to prevent me taking the last resort?

an interesting developement shows that this was caused by welding after it hit the part but I need help to fix it because I ran out of ideas. more on the last comment I sent! the 26th one to be exact.

3 Likes

BodyVelocity is deprecated and I am also pretty sure linear velocity is also deprecated but Im not sure but BodyVelocity is 100% deprecated.

2 Likes

as you can see linear velocity is not deprecated from the offical roblox documentation. LinearVelocity | Documentation - Roblox Creator Hub but bodyvelocity IS deprecated. nevertheless, the result is the same.

to add to this, even if you instance.new a linearvelocity in, it is not listed as depricated.

1 Like

If it still is doing this then just use a raycast. raycasts aren’t that hard to setup so i would recommend using that. There is another type of movement velocity i think meant for fast stuff but I can’t think of it right now.

1 Like

as I said, that is the last resort:

I do not want to resort to a solution like gradually raycasting since it isnt very pleasant. are there any solutions for me to prevent me taking the last resort?

Ah I didn’t read that part, whoops. But again it is not that hard to setup so i would still recommend going with raycasts.

however I still do want to find a way to fix this (because I am stubborn about it at this point) and that is the absolute last resort so please, anyone reading this: enlighten me with a potential solution

When you say

what do you mean by inaccurate?

I have sent a photograph up there as you can see. as you can tell from that image I was aiming in a singular line meanwhile some of the projectiles were going to other direction for some reason.

Ah ok. Also why are you using lookvector*100?

. . .to speed up the velocity? you either need to lookvector*x or unit*x to set up the velocity

Yes but why are you using lookvector specifically, any particular reason other than speed?

no???
also lets not do unnecessary talk here.

What lookvector are you getting?

the… main part of the projectile??? AKA CFrame.new(mainpart.Position,mouse)

You could instead of using a velocity in general just use a for loop and lerp and make it go really fast without using the roblox velocity physics. It is unusual normally for a gun to not use a raycast but if you really do not want to use a raycast then I would just say use this.

you realize that it’d still require me to make raycasts to detect if something actually touched it, right? as you also can see from that image it is infact: not a gun so it cannot be just a long block. also requote:

I do not want to resort to a solution like gradually raycasting since it isnt very pleasant. are there any solutions for me to prevent me taking the last resort?

I can think of a few reasons for this:

  • The linear velocity’s RelativeTo property is set to Enum.ActuatorRelativeTo.World and you are setting the linear velocity’s VectorVelocity to the lookvector*100 every frame. This results in the object moving in different directions when it rotates. To prevent unneeded rotations, either manually set the rotation before setting the velocity or use an AlignOrientation constraint.
  • The linear velocity’s RelativeTo property is set to Enum.ActuatorRelativeTo.Attachment0 and you only set the linear velocity’s VectorVelocity to the lookvector*100 once. The rotations as discussed in the previous point will affect the object the same way. You can prevent unneeded rotations or resort to the previous point.

either way knife or not(I couldn’t tell it was a knife because the picture was blurry so it looked like bullets) lerp would still work and you can just use the .touched event because it wouldn’t really need to be anchored since it would be moving so fast it wouldn’t fall to the floor.

Actually I will rule out the second point. You mentioned that you are using the object’s lookvector so it couldn’t be the second point.