Oh well, one post that took 30 minutes to make is now going down the drain.
Just use an alignposition, use an alignorientation or angularvelocity instance to keep itās respected lookAt vector.
What youāll do is insert an attachment into your players root or torso, wherever you want to put it. Next you add another attachment into the pet. Set the alignpositions attachment0 property to the pets attachment, and the attachment1 property to the players torso or root attachment.
Parent the alignposition inside of whatever part you want to move, and it should work as you want. This is how most simulator games handle their pets, a lot do lerp or tween but tweening can cause more performance issues and requires a loop as well which takes up memory vs a simple alignposition that does the job for you without having to use a loop.
EDIT: Hereās a little snippet of code for you if you donāt understand:
local SoulClone = Soul:Clone()
SoulClone:PivotTo(Root.CFrame)
local Primary = Instance.new("Attachment")
Primary.Parent = SoulClone.PrimaryPart
local AlignPosition = Instance.new("AlignPosition")
AlignPosition.Responsiveness = .1
AlignPosition.Mode = Enum.PositionAlignmentMode.TwoAttachment
AlignPosition.Attachment0 = Primary
AlignPosition.Attachment1 = Attachment
AlignPosition.Position = Attachment.WorldPosition
AlignPosition.Parent = SoulClone.PrimaryPart
AlignPosition.Enabled = true
local Orientation = Instance.new("AngularVelocity")
Orientation.AngularVelocity = SoulClone.PrimaryPart.CFrame.UpVector * 5
Orientation.MaxTorque = math.huge
Orientation.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
Orientation.Attachment0 = Primary
Orientation.Parent = SoulClone.PrimaryPart
Orientation.Enabled = true
SoulClone.Parent = Character
not my faul everyone here got everything mixed up. im sorry about this and my new post SHOULD explain things better. Im not mad, just want this to be done already
aye yo wait why is this actually the solutionā¦
I actually made a mistake in my script. Apologies.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.