VR Body Movement spazzing out

I am trying to make it so the Torso is attached to the Head and it is not attaching properly except detaching itself. It follow but it either disappears, spins out of control and goes far away then back to the head, or latency of the movement.

I have tried AlignOrientation and AlignPosition and it works, but it is not attaching to the neck of/under the head and major latency.
Code/Function for AlignOrientation and AlignPosition:

function FixedPosition(Limb1, Limb2, Pos1, Pos0)
	local SAttachment1 = Instance.new("Attachment", Limb1)
	SAttachment1.Name = "SAttachment1"
	SAttachment1.Position = Pos1
	local SAttachment0 = Instance.new("Attachment", Limb2)
	SAttachment0.Name = "SAttachment0"
	SAttachment0.Position = Pos0
	local Socket = Instance.new("AlignPosition", Limb2)
	Socket.MaxForce = 10000000
	Socket.Responsiveness = 200
	Socket.Attachment0 = SAttachment0
	Socket.Attachment1 = SAttachment1

	local AAttachment1 = Instance.new("Attachment", Limb1)
	AAttachment1.Name = "AAttachment1"
	AAttachment1.Position = Pos1
	local AAttachment0 = Instance.new("Attachment", Limb2)
	AAttachment0.Name = "AAttachment0"
	AAttachment0.Position = Pos0
	local Align = Instance.new("AlignOrientation", Limb2)
	Align.MaxTorque = 10000
	Align.Responsiveness = 75
	Align.Attachment0 = AAttachment0
	Align.Attachment1 = AAttachment1
end

I have tried AlignOrientation, AlignPosition and BallSocketConstraint, it works but my Torso would disappear or not attach to the neck of/under the head and cause major latency.
Code/Function for AlignOrientation, AlignPosition and BallSocketConstraint:

function FixedPosition(Limb1, Limb2, Pos1, Pos0)
	local SSAttachment1 = Instance.new("Attachment", Limb1)
	SSAttachment1.Name = "SAttachment1"
	SSAttachment1.Position = Pos1
	local SSAttachment0 = Instance.new("Attachment", Limb2)
	SSAttachment0.Name = "SAttachment0"
	SSAttachment0.Position = Pos0
	local SSocket = Instance.new("BallSocketConstraint", Limb2)
	SSocket.Attachment0 = SAttachment0
	SSocket.Attachment1 = SAttachment1

	local SAttachment1 = Instance.new("Attachment", Limb1)
	SAttachment1.Name = "SAttachment1"
	SAttachment1.Position = Pos1
	local SAttachment0 = Instance.new("Attachment", Limb2)
	SAttachment0.Name = "SAttachment0"
	SAttachment0.Position = Pos0
	local Socket = Instance.new("AlignPosition", Limb2)
	Socket.MaxForce = 10000000
	Socket.Responsiveness = 200
	Socket.Attachment0 = SAttachment0
	Socket.Attachment1 = SAttachment1

	local AAttachment1 = Instance.new("Attachment", Limb1)
	AAttachment1.Name = "AAttachment1"
	AAttachment1.Position = Pos1
	local AAttachment0 = Instance.new("Attachment", Limb2)
	AAttachment0.Name = "AAttachment0"
	AAttachment0.Position = Pos0
	local Align = Instance.new("AlignOrientation", Limb2)
	Align.MaxTorque = 10000
	Align.Responsiveness = 75
	Align.Attachment0 = AAttachment0
	Align.Attachment1 = AAttachment1
end

I have tried BallSocketConstraint and AlignOrientation, works but my Torso would disappear or spin out of control and goes far away then back to the head and not attach to the neck of/under the head.
Code/Function for BallSocketConstraint and AlignOrientation:

function FixedPosition(Limb1, Limb2, Pos1, Pos0)
	local SAttachment1 = Instance.new("Attachment", Limb1)
	SAttachment1.Name = "SAttachment1"
	SAttachment1.Position = Pos1
	local SAttachment0 = Instance.new("Attachment", Limb2)
	SAttachment0.Name = "SAttachment0"
	SAttachment0.Position = Pos0
	local Socket = Instance.new("BallSocketConstraint", Limb2)
	Socket.Attachment0 = SAttachment0
	Socket.Attachment1 = SAttachment1
	
	local AAttachment1 = Instance.new("Attachment", Limb1)
	AAttachment1.Name = "AAttachment1"
	AAttachment1.Position = Pos1
	local AAttachment0 = Instance.new("Attachment", Limb2)
	AAttachment0.Name = "AAttachment0"
	AAttachment0.Position = Pos0
	local Align = Instance.new("AlignOrientation", Limb2)
	Align.Attachment0 = AAttachment0
	Align.Attachment1 = AAttachment1
end

I have tried HingeConstraint and AlignOrientation, works but my Torso would disappear or spin out of control and goes far away then back to the head and not attach to the neck of/under the head and Torso would disappear.
Code/Function for HingeConstraint and AlignOrientation:

function FixedPosition(Limb1, Limb2, Pos1, Pos0)
	local SAttachment1 = Instance.new("Attachment", Limb1)
	SAttachment1.Name = "SAttachment1"
	SAttachment1.Position = Pos1
	local SAttachment0 = Instance.new("Attachment", Limb2)
	SAttachment0.Name = "SAttachment0"
	SAttachment0.Position = Pos0
	local Socket = Instance.new("HingeConstraint", Limb2)
	Socket.Attachment0 = SAttachment0
	Socket.Attachment1 = SAttachment1
	
	local AAttachment1 = Instance.new("Attachment", Limb1)
	AAttachment1.Name = "AAttachment1"
	AAttachment1.Position = Pos1
	local AAttachment0 = Instance.new("Attachment", Limb2)
	AAttachment0.Name = "AAttachment0"
	AAttachment0.Position = Pos0
	local Align = Instance.new("AlignOrientation", Limb2)
	Align.Attachment0 = AAttachment0
	Align.Attachment1 = AAttachment1
end

This is what I basically see [Function for: AlignOrientation and BallSocketConstraint]:

This is what the other player see [Function for: AlignOrientation and BallSocketConstraint]: (Latency)
https://gyazo.com/31af1becbfce04fe836b24fb77e66571

This is what the other player see [Function for: AlignOrientation and AlignPosition]:
https://gyazo.com/8e1a361a58eb04c1055f4ef4dbcc35a1

I am sorry if I didn’t provide anymore GIFs for you to assist me. I don’t want this post to be too long. But to summarize my problem, Torso is basically not attaching to the bottom of the Head, sometimes spazzing out of Torso, big latency movement on the Torso.

NOTE: These functions are in a ServerScript. Yes, I can teleport the Torso to the Head CFrame and adjust it a bit constantly using RunService, but I don’t want to do that. It will and can affect the legs and it is very choppy and sharp turning. I also have looked for other possible solutions but found nothing. I’ve tried all possible solutions that I know of from my knowledge and got nothing. And yes, I know there are BodyPosition, BodyGyro stuff. But I am not familiar with those movers and I preferably would use BodyMovers that use Attachments since it is simple.

1 Like

You shouldn’t attach the camera to any parts directly, it should be its own CFrame and the head should be attached to the camera * usercframe of head

I know you have said you do not wish to use Run Service, but I would highly recommend using :RenderStepped() In this instance. I think it would be a whole lot easier than attempting to use attachments. Best of luck! :slight_smile:

looks like the updates are happening late. I would use render stepped service and change the CFrames. It would stop the delay from movement.

What do you mean? If you are referring to the VRService:GetUserCFrame() stuff, I have already done that from the start. All I am trying to do is basically attach an unanchored part, the size of the Player Torso, to the head using BodyMovers.

game:GetService('RunService').Stepped:connect(function()
	local VRRightHand = VRService:GetUserCFrame(Enum.UserCFrame.RightHand)
	local VRLeftHand = VRService:GetUserCFrame(Enum.UserCFrame.LeftHand)
	local VRHead = VRService:GetUserCFrame(Enum.UserCFrame.Head)
	game.ReplicatedStorage.VRFolder.Replicate:FireServer(Camera.CFrame * VRHead, Camera.CFrame * VRLeftHand, Camera.CFrame * VRRightHand)
end)
1 Like

I managed to remove latency by only using AlignOrientation and RopeConstraint. Now I am having another problem. Torso freezing in the air then coming back to me. No more spazzing and latency problems (yet).
Skip to 0:20