How do I weld a part to a tweened object?


Try dragging the sensor out of the “SouthTestCar” and rechecking in play mode.

If issue still persists, a yolo check to try and switch Part0 with Part1? (Part1 being SouthTestCar and Part0 being Sensor)

Dragging it out has no effect. It still stays in place. Even switching them has no effect.

Hail mary approach, disable every single script that can be found and only tween the SouthTestCar. If it still for whatever reason, doesn’t move with the car, I’m stuck :man_shrugging:

If it doesn’t work, you’ll probably have to go with another approach to doing the sensor.

All scripts are disabled apart from the one that spawns the cars. It shouldn’t be conflicting with the car. Yeah I can say you’re stuck. I am trying to use a sensor because Raycasting is buggy, a lot of times it detects the car in front too late (and ends up stopping inside of it), no matter how big the ray direction is.

Have you tried doing it on client and doing server sided checks for verification instead? (so that it reacts quicker?)

I’ve been planning to do something like that, but can’t figure out how to convert the current setup (tweening the cars serverside through FirstScript and SecondScript inside of them) to clientside. Good suggestion though.

I don’t suggest that at all as you’re going to very quickly, run into performance issues (especially if its a large amount of things).

Stuttering will also be very prominent. Just do the movements/visuals on client, and checks/verification on server.

Yes, the stuttering and lag is what actually gave me an idea to try and convert it to clientside. Do I simply change the scripts to localscripts?

1 Like

Keep important things on the server (if it relates to gameplay/security)
and visuals/tweening on client, so yes you can change it to localscripts OR you can try remote events if you’re able to (or TweenServicev2 which uses remote events/other trickery to get things from server to client easier).

I’ve been trying to use these various tweenservice modules including these, but the car then doesn’t move.

Are you sure there are no bugs/using the module properly?
(can you show me how you’re doing it?)

That was a few days ago, and I’ve already restored the save to it’s original state sadly. I think I need a custom approach here, instead of modules. I use the Completed event a lot, and many modules don’t have it.
What I did was just redefine TweenService by requiring the module, instead of using the actual service. I converted the “create” commands to whatever it’s called in the module. Yet still it didn’t work, without any errors in output.

If you’re familiar with it, its actually quite easy to implement your own. The module I just linked actually lets you yield it if you need to so that you can run code right after it finishes.

I don’t understand how I can do that?
Workspace.SouthTestCar.FirstScript:111: attempt to index nil with ‘Wait’
A stupid error, but I just don’t understand how to convert “completed” to whatever should be there instead.

Welded parts can only be “move” or “tweened” with their other welded part if one of their CFrame gets updated. This wouldn’t work if you’re only setting their Position or Orientation.

That’s what I was doing, the latter. What are some other ways to attach the part to the car?

WeldConstraints? They are Weld but better.

Already tried it, but it didn’t work. The part just stayed in place where I added it, even if I was to unanchor it.

How about this, just do a test where you place two random parts, weld each other and update or tween one of their CFrame.