Object on the back of character

Hey guys I’m trying to make this book appear on the back of my character vertically. I have found this code:


local Players = game:GetService("Players")
local function OnPlayerAdded(Client)
 local Part = workspace.BeginnerBook
 local Weld = Instance.new("WeldConstraint")
 if Client.Character then
  wait(0.5)
  Part.Position = Client.Character.UpperTorso.Position
  Part.Orientation = Client.Character.UpperTorso.Orientation
  Weld.Parent = Client.Character
  Part.Parent = game.Workspace
  Weld.Part0 = Client.Character.UpperTorso
  Weld.Part1 = Part
  Weld.C0 = Part.CFrame.new(0,0,0) *CFrame.new(0,0,0)
  
 else
  Client.CharacterAdded:Connect(function()
   wait(0.5)
   Part.Position = Client.Character.UpperTorso.Position
   Part.Orientation = Client.Character.UpperTorso.Orientation
   Weld.Parent = Client.Character
   Part.Parent = game.Workspace
   Weld.Part0 = Client.Character.UpperTorso
   Weld.Part1 = Part
  end)
 end
end

Players.PlayerAdded:Connect(OnPlayerAdded)

Although it just ends making this, i’ve tried messing with it but nothing changes when i mess with the CFrame.

2 Likes

I think your problem may be the because you are using CFrame, which as stated above (which is taken from the developer hub) moves everything which is attached to it. Try using Position instead and tell us the new results.

4 Likes

I don’t think you need such a huge script for that. First off you need to add an attachment to the main part of your book. If your book consists of more than 1 part weld everything together and name the main part ‘Handle’. After that put your book inside a accessory and name the attachment ‘BodyBackAttachment’. This makes sure that your book is at the back of your character. After finishing put the Book Accesory inside ServerStorage. It should then look like this:

grafik
Then make a script which clones this accessory every time a player’s character is added and parents the cloned book to this character.

1 Like