I have a script that plays a book-reading animation, and then gets a random book model from
ReplicatedSorage adds a
Motor6D instance and connects
part0 to the hand and
part1 to the book’s primary part.
This works if the book was just a single part and not a model. But when parenting it to the model’s primary part it attaches the character to the primary part, instead of the opposite which is attaching the book to the character’s hand.
Here’s the script:
workspace.Part.ProximityPrompt.Triggered:Connect(function() local char = plr.Character or plr.CharacterAdded:Wait() local hum = char:WaitForChild("Humanoid") local animator = hum:WaitForChild("Animator") local animation = workspace.Part.SeatedReading local animationTrack = animator:LoadAnimation(animation) animationTrack.Priority = Enum.AnimationPriority.Action animationTrack.Looped = true animationTrack:Play() local hand = char:WaitForChild("RightHand") local book = books:GetChildren()[math.random(1,#books:GetChildren())]:Clone() book.Parent = hand local motor6d = Instance.new("Motor6D") motor6d.Parent = book motor6d.Part1 = hand motor6d.Part0 = book.PrimaryPart end)
Here’s a demo of the bug: