What do you want to achieve? Free movement for the trailer.
What is the issue? The trailer seems to be attached to the truck but there is no weld.
First it shows the bug and then how I manually resolve it by moving it and how I want the truck to work.
What solutions have you tried so far? There is nothing on devforum about trucks, and all I saw didnt resolve the problem. Also I tried to change the length of the rope but still nothing.
This function makes the attachments and connects the rope to them.
-- veh = trailer
-- Vehicle = truck
if Vehicle.Type.Value == "Truck" and veh then
Weld(veh.Root, Vehicle.Engine)
Weld(Vehicle.TrailerRoot, Vehicle.Engine)
local att0 = Instance.new("Attachment")
local att1 = Instance.new("Attachment")
att0.Position = Vector3.new(-.5, 0, 0)
att1.Position = Vector3.new(.5, 0, 0)
att0.Parent = Vehicle.TrailerRoot
att1.Parent = veh.Root
Vehicle.TrailerRoot.RopeConstraint.Attachment0 = att0
Vehicle.TrailerRoot.RopeConstraint.Attachment1 = att1
end
Can i ask why you are scripting the constraint and its attachment rather than just setting it up physically? Its much easier to set it up physically and position them perfectly until it moves as desired… then if need be you can script the proper positions.