You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I Am teleporting my vehicle in and out of my newly designed mod shop, but the issue is thate evry teleportation causes the wheels to glitch. The vehicle anchors before the teleport but there seems to be no way of doing this that I know of. I’ve tried disabling and then enabling constraints before and after the teleport, alongside with attempting to set network ownership (However that Didn’t work). If anyone has any advice please let me know!
Ps. I have looked through other dev forum posts but they seemed to have issues whilst driving or entering a vehicle. For me it’s while teleporting
Ps Ps. I use vehicle:SetPrimaryPartCFrame to teleport as it’s seemed to be the most efficient for teleporting the whole vehicle.
Video of the uh, issue:
Last notes:
Ignore the car spawning sideways, it’s something I can fix by altering CFrames
This only happens like 40% of the time. not a lot, but it’s really annoying when the player wants to leave and drive around
Do you have the wheels Anchored as well, and are they part of the entire Model you are teleporting or are they separate?
I’m not sure if this is what you’ve done, but I know I’ve made vehicles with the Parts Anchored using a weld script that Unanchors them, but I don’t have the wheels grouped with the main Model since I didn’t want them welded to it.
Also you may want to have the SpringConstraint | Roblox Creator Documentation set to true as well as the PrismaticConstraint, HingeConstraint, or the SlidingBallConstraint LimitsEnabled true, that way you can limit the extents they travel to.
I think the issue is that the seat is teleporting, but while that’s happening the wheels are getting dragged along by their constraints (if the A-chassis uses constraints).
this doesn’t actually move the wheels with it because their not welded, their being moved by constraints. the only way I can think of fixing this is by just using MoveTo() or Anchoring the model before moving it.
I actually do anchor the vehicle before moving it and this happens, also I’ll try using MoveTo() but from what I remember it gave the same if not similar results
Most definitely, what I need to figure out is how to stop them from being dragged, all I can think of is calculating an offset for them compared to the vehicle seat and then setting them to that once teleported.
I’m gonna look into it more to see what else it holding it together, but there’s a ton of welds in the Drive Seat so I’m assuming everything is attached to that
You could generate weld constraints temporarily to attach the 4 wheels to the car chassis. Then when you’re giving the player back control over the vehicle, you destroy the weld constraints.
As @DataSigh recommended I’d weld them, but use a WeldConstraint that’s at the vehicle/wheel ‘resting’ position then just make Active true before moving the model, then make it false after it’s been moved.
Hm, try disabling The Initialize script because I remember from another post that that is what actually Welds and unanchores everything, so just a thought but try:
First Disable Initialize script
Move the primary part of the car (What you were doing before)
Enable Initialize script
Edit: from the image you sent, that is one nice map lol
However Overall the glitching of the wheels seems to stop once I exit the shop which is a pro. I’ll try and see if I can maybe use an offset to make the wheels look a little more legit.
1st update (May be unrelated)
Now the wheels are fine but my camera is stuck here, not sure if it’s related but the camera is stuck here:
10/10 times the car wheels remained normal upon exiting
2/10 times the car wheels were glitched upon spawning in the mod shop box, however it’s not a terrible bug to deal with
If anyone has a solution to the car wheels glitched (after teleport and not after the teleport to the ground) please dm me or reply to this topic if possible!
Update, when I tried disabling the initialize script nothing happened (as in the result did not change) but I appreciate the suggestion and I’ll be sure to try that if I run into anymore issues! Thanks again to everyone that helped!