Move a part two times simultaneously?

Aloha developers. I am making pets for a game I am working on. I have the part of moving the pet to the player down perfectly, but I want to add a slight bounce you see with many pets in other games that contain them. I made a tween for this, but the tween moves the pet to the position they were already in. I made the tween goal the position of the pet + Vector3.new(0,1,0) so it will obviously stay in place, except going up.

How can I make the pet levitate-bounce slowly while simultaneously following the player?

1 Like

like the character, give the pet a root part, have the root part follow the player, and the model kind of bounce around the root part.

1 Like

I welded the part to the now invisible root part, and it worked fine and as expected. But then I put the bounceTween script in the visible part:

local pet = script.Parent

local players = game:GetService("Players")
local tweenServ = game:GetService("TweenService")

local tweenInfo = TweenInfo.new(3, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut, -1, true)
local goal = {}
goal.Position = pet.Position + Vector3.new(0, 1, 0)
local tween = tweenServ:Create(pet, tweenInfo, goal)
tween:Play()

It does the same thing it does before I created a new part.

it has been a while, but what I would do is set it up as a rig(so not with weld) and then use AnimationController and have the bounce as a animation.

but if you don’t want to use animations and are using “weld” object, maybe try “WeldConstraint”, I think that might work, not sure. sorry for not being very helpful.

at the bottom, it has a code sample for animating non player objects