(rpet is a brick in workspace) (base is a part that is welded to the character)
My issue is once it reaches the location it moves too much heres a gif of it:
https://gyazo.com/e1b388ecc42085c64322a8ff009d7692
what I need is for it to move a bit but not that much how would I do that?
function MoveBook(pet, mode) local character = game.Players.LocalPlayer.Character local rpet = workspace["Book1"] local rmode = mode local inc = .7 if mode == true then -- if this is true then make book float local base = character[id.."A"] local dir = CFrame.new(rpet.Position, base.Position).lookVector print(dir) for i = 0,10,2 do rpet.CFrame = rpet.CFrame + (dir * inc) wait(0.05) end else local base = character["Left Leg"] local dir = CFrame.new(rpet.Position, base.Position).lookVector print(dir) for i = 0,5,1 do rpet.CFrame = rpet.CFrame + (dir * inc) wait(0.05) end end end while wait() do MoveBook("Book1", true) end