Welding for roblox cars not working?

So this is my first post so sorry for any issues! Below is the issue i am experiencing.

  • What are you attempting to achieve? I am trying to get the welding to work so the cars don’t end up like this!
  • What is the issue? My cars end up like this when joining the game in studio or in the actual game place! I have tried other cars and they are doing the same.
  • What solutions have you tried so far? I have asked a few friends.

make sure to anchor them if you didnt.

1 Like

There all anchored. They worked fine the first couple of times.

Are you using an auto-welder? If so, have you changed anything from the script?

1 Like

Have not touched the script. It could be Roblox the same issue is happening to my ferry too!

What did it look like before the issue?

1 Like

Worked the first couple of times. Probably ROBLOX updated something to do with welding - I have no clue.

1 Like

Started a new game place and they seem to be working fine any clues as to why its working on a different game place?

Have you used any free models? Do other scripts work? Is your game infected?

1 Like

Can confirm i have used 1 free model which has the certified badge when in the library. Surely this shoudent be infecting it?

If it has the certified badge it should be fine. Does anyone else have access to your game?

1 Like

Nope completely private. Team create is not active.

Can you show how you set up your welds for each car model?

It looks like they the car parts are converging to a single position.

Edit: just one is fine if they follow the same pattern.

1 Like

local MiscWeld = {}

function MakeWeld(x,y,type,s)
if type==nil then type=“Weld” end
local W=Instance.new(type)
W.Part0=x W.Part1=y
W.C0=x.CFrame:inverse()*x.CFrame
W.C1=y.CFrame:inverse()*x.CFrame
W.Parent=x
if type==“Motor” and s~=nil then
W.MaxVelocity=s
end
return W
end
function ModelWeld(a,b)
if a:IsA(“BasePart”) then
MakeWeld(b,a,“Weld”)
elseif a:IsA(“Model”) then
for i,v in pairs(a:GetChildren()) do
ModelWeld(v,b)
end
end
end

car = script.Parent.Parent.Parent
misc = car:WaitForChild(“Misc”)
The script?

Yeah, that works too, if a script is doing the welding then its a scripting support problem. Also, the workspace explorer is a good idea to pair along with the script.

252gw6d

also be sure to put three back ticks ``` before and after the script on your keyboard to format scripts like below:

local MiscWeld = {}

function MakeWeld(x,y,type,s)
if type==nil then type=“Weld” end
local W=Instance.new(type)
W.Part0=x W.Part1=y
W.C0=x.CFrame:inverse()*x.CFrame
W.C1=y.CFrame:inverse()*x.CFrame
W.Parent=x
if type==“Motor” and s~=nil then
W.MaxVelocity=s
end
return W
end
function ModelWeld(a,b)
if a:IsA(“BasePart”) then
MakeWeld(b,a,“Weld”)
elseif a:IsA(“Model”) then
for i,v in pairs(a:GetChildren()) do
ModelWeld(v,b)
end
end
end

car = script.Parent.Parent.Parent
misc = car:WaitForChild(“Misc”)
1 Like

Ah sorry! Thank you a lot all for the help!

Hold on, i’ll upload a gif of what I think your weld script is doing and edit this post.

This is what happens when a script creates a weld with the old Roblox welding system for part0 and part1:

As seen the parts tend to go to the same position as the part0 unless the script edits the C0 joint CFrame which it might fail when spawning the car into the game as some parts of the game hasn’t finish loading in yet.

Might be better to use a weld script like in moon Animator which does it automatically for a model.

1 Like

Thank you so much! Will use moon animator!