Yes but if you look at the curves for sine and cosine you will see why i made the switch.
Tween Service allows for customization, such as different easing styles.
2 Likes
Am i supposed to make a new tween every heartbeat or something? Is that costly for the client? @Luacrative solution is giving me the effect I want and I think it wont have noticeable performance cost.
No, with Tween Service, you can just make a new tween for every time the player moves. Hereās how Iād do it:
- Constantly playing animation for the pet to move up, down, tilt side-to-side, etc.
- Tween Service used to create a smooth movement from the original position to the new position as determined the by the CFrame offset of the player.
Now I know āCFrame offsetā sounds scary but itās really just:
petHRP.CFrame:toObjectSpace(playerHRP.CFrame); -- HRP = Humanoid Root Part
-- This is the equivalent to playerHRP.CFrame - petHRP.CFrame which just gives you the CFrame offset of the pet's HRP to the player's.