Does anyone know how to fix this problem? Every time I spawn in this vehicle it just flies to the middle of the baseplate.
https://gyazo.com/1f32da7190557311c563405da0cc01a1
Theres probably a welded part with a Joint or constraint that’s connected with the car and it will literally pull the whole car back, the part is probably anchored
So I looked through and they were all anchored but when I unanchored it and spawned it, it all fell apart. It appears my weld didn’t work quite right as after it crumbles it all stays still like it’s glued to the air.
Is there any script that welds the car?
Try and find the part that’s anchored because it’s probably not grouped with the model that the script is trying to weld to
https://gyazo.com/ad3b6f669902cf02ecf4b8f8198080d6
There’s a weld inside the group for the rayparts and for the actual model. It’s all unanchored though. It doesn’t teleport away anymore but it’s still falling apart.
Model Weld Script:
local model = script.Parent
local part = script.Parent[“Engine”]
function Weld()
script.Parent[“RayParts”][“Weld”].Disabled = false
for i, obj in pairs(model:GetChildren()) do
coroutine.resume(coroutine.create(function()
if obj:IsA(“BasePart”) then
local w = Instance.new(“Weld”,script)
w.Name = obj.Name
w.C0 = part.CFrame:inverse() * CFrame.new(part.Position)
w.C1 = obj.CFrame:inverse() * CFrame.new(part.Position)
w.Part0 = part
w.Part1 = obj
end
end))
end
for i, obj in pairs(model:GetChildren()) do
coroutine.resume(coroutine.create(function()
if obj:IsA(“BasePart”, “UnionOperation”, “Part”) then
obj.Anchored = false
end
end))
end
end
wait(1)
Weld()
RayParts Weld Script:
local model = script.Parent
local part = script.Parent.Parent[“Engine”]
function Weld()
for i, obj in pairs(model:GetChildren()) do
coroutine.resume(coroutine.create(function()
if obj:IsA(“BasePart”) then
local w = Instance.new(“Weld”,script)
w.Name = obj.Name
w.C0 = part.CFrame:inverse()
w.C1 = obj.CFrame:inverse()
w.Part0 = part
w.Part1 = obj
end
end))
end
for i, obj in pairs(model:GetChildren()) do
coroutine.resume(coroutine.create(function()
if obj:IsA(“BasePart”, “Part”) then
obj.Anchored = false
end
end))
end
end
wait(1)
Weld()
sorry I have bad internet and loading any videos scrnshots or gifs I can’t load it Sorry :(.
Welp I dont even know how the script works lol sorry thats all I can tell you for now,
Theres a part that is anchored and it has a joint that will pull back the car
Try deleting the part and re anchor the car and then run the game
Do you have a BodyPosition? If you do, set the position of the BodyPosition to where it is currently before unanchoring.
Oh my goodness that just fixed all the problems I was having with it. It was glitching and hovering crooked and being crazy and after I fixed the anchoring and repositioned that it fixed it. Thank you!