Resizing parts that use mechanical constraints freeze

If I try to resize a part that is connected via a mechanical constraint for example a spring the part freezes

here is a video of the problem

here is a project with the problem
ResizePhysics.rbxl (56.8 KB)

and here is the script within the project

local RunService = game:GetService("RunService")
local part = script.Parent

workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
workspace.CurrentCamera.CameraSubject = part

RunService.Heartbeat:Connect(function()
	part.Size = Vector3.one * math.random()
end)

if the spring is disabled then it will works fine

1 Like

I just tested to see if editable meshes have this same problem and they donโ€™t

local AssetService = game:GetService("AssetService")
local RunService = game:GetService("RunService")

local options = {CollisionFidelity = Enum.CollisionFidelity.Hull, RenderFidelity = Enum.RenderFidelity.Precise, FluidFidelity = Enum.FluidFidelity.UseCollisionGeometry}

local mesh = AssetService:CreateEditableMesh()
local content = Content.fromObject(mesh)
local vertex1 = mesh:AddVertex(Vector3.new(0, 1, 0))
local vertex2 = mesh:AddVertex(Vector3.new(-2, -1, 0))
local vertex3 = mesh:AddVertex(Vector3.new(2, -1, 0))
local vertex4 = mesh:AddVertex(Vector3.new(0, -1, 2))
local face1 = mesh:AddTriangle(vertex1, vertex3, vertex2)
local face2 = mesh:AddTriangle(vertex1, vertex4, vertex3)
local face3 = mesh:AddTriangle(vertex1, vertex2, vertex4)
local face4 = mesh:AddTriangle(vertex2, vertex3, vertex4)
local normal1 = mesh:AddNormal()
local normal2 = mesh:AddNormal()
local normal3 = mesh:AddNormal()
local normal4 = mesh:AddNormal()
mesh:SetFaceNormals(face1, {normal1, normal1, normal1})
mesh:SetFaceNormals(face2, {normal2, normal2, normal2})
mesh:SetFaceNormals(face3, {normal3, normal3, normal3})
mesh:SetFaceNormals(face4, {normal4, normal4, normal4})

local part = AssetService:CreateMeshPartAsync(content, options)
part.Position = Vector3.new(0, 30, 0)
part.Parent = script.Parent

local attachment = Instance.new("Attachment")
attachment.Parent = part

local spring = Instance.new("SpringConstraint")
spring.Visible = true
spring.Attachment0 = attachment
spring.Attachment1 = workspace.Part2.Attachment
spring.Parent = part

workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
workspace.CurrentCamera.CameraSubject = part

RunService.Heartbeat:Connect(function()
	mesh:SetPosition(vertex2, Vector3.new(-2 + math.random() * 2, -1, 0))
	mesh:SetPosition(vertex3, Vector3.new(2 + math.random() * 2, -1, 0))
	mesh:SetPosition(vertex4, Vector3.new(0, -1, 2 + math.random() * 2))
	part:ApplyMesh(AssetService:CreateMeshPartAsync(content, options))
end)

Can you set the script context to โ€œserverโ€ and try it again? Thanks!

this is what happens if I make the server resize the part

but if I give the client network ownership and make the client resize the part then it works




but I also have another problem that Iโ€™m not sure if its 100% related to this problem


in this example the client has network ownership and if I resize the part it freezes the hole assembly
TestResize.rbxl (73.7 KB)
here is the project if you would like to test for yourself

one strange thing about this problem is if I rename the parts it fixes itself


after more testing just renaming Torso makes it work
I was not able to find any other word that broke it Torso is the only word iv found so far that breaks it and its case sensitive so torso works fine

Edit*
after more testing even renaming does not solve all problems for example instead of setting the size to 3 if you set the size to 1 it will freeze its very strange Iโ€™m not able to pinpoint the exact location that causes the problem


In the video you shared, you were changing the context from server to client. Can you try with server context please? Thanks!

that is just to set the camera subject the script that is resizing has a context of server