Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I reduce the movement of this part when it reaches the location?

Asked by 7 years ago
Edited 7 years ago

(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
0
Could you supply the whole 'MoveBook' function please? Goulstem 8144 — 7y
0
@Goulstem I've edited the post and included the entire function now. Fraxinus_Sanctus 38 — 7y

Answer this question