Is there a way to do this..?

What im trying to do is that when a button is clicked this rig will appear above me but then using allign position it will move to my humanoidrootparts position but the problem is the fact that attachment 0 of the allign position is the humanoidrootpart.rootattachment and it wont move because you have to move the humanoidrootpart to make it work but since the humanoidrootpart isnt an attachment that wont work. Please help, here is the code: ``` local remote = game.ReplicatedStorage.RemoteEveeent

remote.OnServerEvent:Connect(function(plr)

local st = game.ReplicatedStorage.Stand


local stand = st:Clone()

local alignPos = Instance.new("AlignPosition")

local char = plr.Character
local hum = plr.Character:FindFirstChild(“Humanoid”)

local humr = char:FindFirstChild(“HumanoidRootPart”)

local standHumr = stand.HumanoidRootPart
standHumr.Position = humr.Position + Vector3.new(5,5,-10)
standHumr.Orientation = humr.Orientation
stand.Parent = workspace

  alignPos.Attachment0 = stand:FindFirstChild("HumanoidRootPart").RootAttachment
  alignPos.Attachment1 = humr.RootAttachment
alignPos.ApplyAtCenterOfMass = true
  alignPos.Parent = stand

  
 


end)
1 Like

Please format all the code in one piece.
AlignPositions have a variety of ways they work. If you use the 2 Attachment setup you need to have one Attachment in the rig and add a new Attachment to the Player with your script, rename that Attachment and then then get the Attachment0 and Attachment1 set properly in your script.
There are many Properties in an AlignPosition that affect how it moves. Do a bit of research and experiment with them to get the result you require.

1 Like

You don’t want to do these 2 things, since this is trying to move the Stand’s RootPart, which is going to be prevented/undone by the AlignPosition constraint. Instead, you should either add a new Attachment to the character’s HumanoidRootPart, that has the Position humr.RootAttachment + Vector3.new(5,5,-10), and align to that. Or, you could have the offset attachment in the Stand, just with the opposite offset (subtract Vector3.new(5,5,-10))

If you read the code you would see that I already did that.

1 Like

Yes, but I also said this:

There are many Properties in an AlignPosition that affect how it moves. Do a bit of research and experiment with them to get the result you require.

1 Like