AlignPosition Bug

I am currently experiencing a bug with the align position constraint. I think it might also be happening with the AlignOrientation constraint too.

The problem

When I update the Position property for AlignPosition it doesn’t seem to recognize that change.

A way around it is to disable and then re enable AlignPosition.RigidityEnabled.

Here is a video alongside code.

local RunService = game:GetService("RunService")

local AlignPosition = script.Parent:WaitForChild("AlignPosition")

RunService.Stepped:Connect(function(time,deltaTime)
	AlignPosition.Position += Vector3.new(0,0,deltaTime)
	--[[
	AlignPosition.RigidityEnabled = true
	AlignPosition.RigidityEnabled = false
	]]
end)

(With hacky solution)

local RunService = game:GetService("RunService")
local AlignPosition = script.Parent:WaitForChild("AlignPosition")
RunService.Stepped:Connect(function(time,deltaTime)
	AlignPosition.Position += Vector3.new(0,0,deltaTime)
	
	AlignPosition.RigidityEnabled = true
	AlignPosition.RigidityEnabled = false
	--[[
	    For some reason that seems to get rid of the problem.
	]]
end)

I have been experiencing this since the new constraint parameters came out. But I now I have a need for the new constraints properties.

This is the reproduction file. AlignPositionBug.rbxl (30.2 KB)

18 Likes

I have the same problem man, but with that “cheat” it helps me in part.

3 Likes

I’ve been having a similar issue but for AlignOrientation. My fix is to just disable and enable it on the same line of code.

1 Like

100% reoccurring issue that could use fixing. used AlignMovers (mostly pos and ori) for 30 days now, comes up every time.

I use the code AlignPos.Enabled=false;wait();AlignPos.Enabled=true to fix the issue

1 Like

Hey there. This has been bugging me for ages now. Not only that but the hack seems to have broken my character to and doesn’t work anymore.

If anyone could fix this bug please do.

This has made my game unplayable.

CONNECTION_Stepped = RunService.Stepped:Connect(function(runTime,deltaTime)
		LinearVelocity.PrimaryTangentAxis = (Camera.CFrame.LookVector * Vector3.new(1,0,1))
		LinearVelocity.SecondaryTangentAxis = (Camera.CFrame.RightVector * Vector3.new(1,0,1))
		AlignOrientation.RigidityEnabled = true
		AlignOrientation.RigidityEnabled = false
		if LinearVelocity.PlaneVelocity.Magnitude > 0 then
			AlignOrientation.CFrame = CFrame.lookAt(Vector3.new(),HumanoidRootPart.AssemblyLinearVelocity * Vector3.new(1,0,1),Vector3.FromAxis(Enum.Axis.Y))
		end
	end)

I want to bump this up just to say that even though this might be considered a very small issue, that doesn’t impact a large number of developers, it still has its negative impact on some developers.

For example, I am currently making a MoveTo function (kinda like the one from Humanoid), and I am using the Instances AlignPosition and AlignOrientation. I am currently being forced to create a BasePart with an attachment for it to work because as stated in this post, the position property is totally broken. The property changes but no updates occur to the part being moved.

As some people say in this post, there is a workaround, but that doesn’t mean it doesn’t require a fix. Disabling and enabling is slower than making the AlignPosition follow a part, as the engine for sure does a lot of things when changing the Enabled property.

That said, please fix this, I want to be able to change the following properties without needing to Enable/Disable:

  1. AlignPosition.Position
  2. AlignOrientation.CFrame

Thank you, focasds.

2 Likes

I agree. https://gyazo.com/385c78515ee215bed8464f2205bda1cc
updating the position of the AlignPosition to the HumanoidRootPart.
The client isn’t updated at all. The server shows the part moving perfectly fine.

this is still not fixed, and the hacky solution doesn’t seem to work either.

also i tested the constraints example place and it just doesn’t work their either.

2 Likes

The hacky solution definitely works, you just need to toggle rigidity enabled immediately following any change to the Position value. For my code I’ve got a wait inbetween the toggle - it might not work consistently if you toggle rigidity enabled off/on on the same frame, perhaps?

Definitely still a horrible bug, though. It’s entirely Feature-Breaking - it makes single-attachment constraints completely unfunctional for anything but a set-and-forget positional value.

Definitely needs prioritizing pretty high up IMO

1 Like

in my case it didn’t work, but it’s good that it works for other people at least.

Can I see a snip of the code? I can compare the two

https://gyazo.com/79c2c2819e546c85476a26afb6ac441a.mp4
You delete “AlignPosition” and it still works as if it’s not deleted.

1 Like

Bump, still a huge issue which caused me to waste hours of debugging. Never expected that one of its most important properties wouldn’t trigger an update?

2 Likes

I’ve recently done the same thing. I was not expecting this behavior for one of the core properties.

FWIW, I solved it temporarily by switching to TwoAttachment mode, parenting Attachment1 to Terrain, and setting it’s position instead.

3 Likes

Nvm my problem is related to something else regarding alignpositions
What an annoying constraint

bump :confused:
Pysephs solution worked for me

Bumping this issue.

Pyseph’s workaround still works.