I tried to make a growing truss come out from a part, but the problem is that if the part is rotating, the truss doesn’t rotate with it. I welded the truss to the part before it grew, but now the part moves with the truss, making it look really weird. Is there any way to fix this?
the part isn’t anchored, neither is the truss.
https://gyazo.com/53d8ec2b39ee21c63518ccc64b40daa3
script.Parent.PrimaryPart.BodyAngularVelocity.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
script.Parent.PrimaryPart.BodyVelocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
local Truss = game.ServerStorage.EventObjects.Truss:Clone()
game:GetService("PhysicsService"):SetPartCollisionGroup(Truss, "script.ParentParts")
Truss.Parent = script.Parent
local Spot = CFrame.new(math.random(script.Parent.PrimaryPart.Size.X*-0.5,script.Parent.PrimaryPart.Size.X*0.5),0,math.random(script.Parent.PrimaryPart.Size.Z*-0.5,script.Parent.PrimaryPart.Size.Z*0.5)) * CFrame.Angles(0,math.pi/math.random(10),0)
Truss.CFrame = script.Parent.PrimaryPart.CFrame * Spot
local Weld = Instance.new("WeldConstraint",script.Parent)
Weld.Part0 = Truss
Weld.Part1 = script.Parent.PrimaryPart
for i=1,math.random(10,25) do
if script.Parent == nil or Truss == nil or script.Parent.PrimaryPart == nil then
break
end
Truss.Size = Truss.Size + Vector3.new(0,2,0)
Truss.CFrame = Truss.CFrame * CFrame.new(0,1,0)
wait(0.1)
end