How to get my mesh part to move in roblox

I have a mesh part(Imported from blender) and I would like to get it to move in a sequence. EG: Its a Pet, I would like the pet to move forward, turn around and come back to starting position. I have all the animations already and i know how to get them to work, I just can’t seem to get the pet to move at all.

Please help.

3 Likes

Try this post i found with a quick research and tell me if it solve your problem:

5 Likes

Thanks so much, but I dont need to import the animations, once the model is in roblox I need it to physically move from point A to point B

4 Likes

Yeah i know but the point that interest you is:
It also explains how to use the custom animation made on blender

4 Likes

It’s the same as moving a part!

4 Likes

I can get a part to move, when I apply the same logic to the mesh part, nothing happens and I get no errors.

4 Likes

Are you using scripts or forces/Velocities? Also make sure its not anchored.

4 Likes

My bad, misunderstood your post sorry. What you can do is set HipHeight on the Humanoid and use Humanoid:WalkTo()

4 Likes

I am using scripts to get the part to move, im a new scripter, so im applying the same logic as moving a part, and applying it to the mesh. but nothing is happening.

local part = script.Parent
local startPosition = part.Position
local distance = 5 – Change this value to adjust the horizontal distance of the movement.
local speed = 1 – Change this value to adjust the speed of the movement.

while true do
local currentTime = tick()
part.Position = startPosition + Vector3.new(math.sin(currentTime * speed) * distance, 0, 0)
wait(0.1) – Adjust the wait time to control the smoothness of the movement.
end

3 Likes

ok so for some reason I got the part to move… forwards and backwards but how would I get the pet to turn around to go back?

3 Likes

You would use Orientation to turn the part/Pet. so like part.Orientation = Vector3.new(0,5,0) + part.Orientation or something like that

2 Likes

You also could use CFrame LookAt

2 Likes

I would recommend using TweenService to move your pet.

2 Likes

could you give me an example of how to use tweenservice to move my pet please?

1 Like