I want to make the part follow behind me, like a pet would in simulator games. But the align position seems like it knows where it needs to go, but the part doesn’t move.
External MediaThis is the script that makes the part follow, a Local Script whose parent is the part.
RunService.RenderStepped:Connect(function()
if (script.Parent:IsA("BasePart")) then
local pet = script.Parent
pet:FindFirstChild("AlignPosition").Position = (player.Character.HumanoidRootPart.CFrame * cframe.Value).Position
end
end)
I can confirm that the script is running, since the Position value inside of the AlignPosition is changing as I move around.
I also figured out that the part is aligning to the origin (0,0,0) for about 10-20 seconds, then it begins to follow behind my character.