Im trying to make/use a dealership system in which the cars spawn replicated from serverstorage (im using How to make a Car Dealership with Saving in Roblox Studio - Part 3 | GUI, DataStore - YouTube for the dealership)
2. What is the issue? Include screenshots / videos if possible!
Specific cars will spawn floating and/or not intialized. I use A-Chassis 6.81 T by Novena - Creator Marketplace (roblox.com) for the chassis.
3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried removing the hitboxes (which are based around nocollideconstraints for the wheels, and the entire body is anchored. Heres an image of plugins.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
The miscweld
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")
---------------------------
--[[
--Main anchor point is the DriveSeat <car.DriveSeat>
Usage:
MakeWeld(Part1,Part2,WeldType*,MotorVelocity**) *default is "Weld" **Applies to Motor welds only
ModelWeld(Model,MainPart)
Example:
MakeWeld(car.DriveSeat,misc.PassengerSeat)
MakeWeld(car.DriveSeat,misc.SteeringWheel,"Motor",.2)
ModelWeld(car.DriveSeat,misc.Door)
]]
--Weld stuff here
car.DriveSeat.ChildAdded:connect(function(child)
if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
child.C0=CFrame.new(0,-.5,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)*CFrame.Angles(math.rad(13),0,0)
end
end)
---------------------------
return MiscWeld
If you need any more scripts to look through, I will provide them. Sorry for the bother.
The only items in misc on this vehicle is doors, those are welded correctly by the motors script.
Some vehicles do not even have this however and will still not spawn correctly.