Robot Pathfinding

Hi, thanks for coming here.

I have this meshed robot which I want to script that it moves to a part. I have tried pathfinding but the problem is that I can’t get the whole model to move on the path (only 1 part).

Summary
-I want this model with mesh parts to move to a part (destination).

2 Likes

I’m not sure I quite understand.
You’re saying that only one part of the model is actually moving?
Can’t you just use motor6d’s or a rig editor to connect the model’s parts?

Set a primary part to the one where its child is a script that runs the pathfinding service and then weld all the other parts to the primary part. It works

here is your quick answer

Thats not what he meant. He does know how to use the service. Its just the model that is not welded

1 Like

@zaydoudou you sure about that?

also instead of “he” use “she”

You should read the entire topic to understand.

local pathParts = game.Workspace.Path

local start = script.Parent.Part (this is the model)

local finish = game.Workspace.Finish (this is where I want to get to)

local PathfindingService = game:GetService("PathfindingService")

local path = PathfindingService:CreatePath()

path:ComputeAsync(start.Position, finish.Position)



local waypoints = path:GetWaypoints()

pathParts:ClearAllChildren()



for _, waypoint in pairs(waypoints) do

local part = Instance.new("Part")

part.Shape = "Ball"

part.Material = "Neon"

part.Size = Vector3.new(0.6, 0.6, 0.6)

part.Position = waypoint.Position

part.Anchored = true

part.CanCollide = false

part.Parent = pathParts

start.Position = waypoint.Position

wait(0.1)

end

ok, then weld all the parts then go move it

This is what I got At the moment.

I don’t mind he or she.

Have you tried my suggestion to fix it?

It doesn’t move when welded for some reason.

It wont because you welded it to a part that doesnt run the script

i’m confused, you said “it works” but she said “it doesn’t move?”

She tried your suggestion. Not mine

That what I got at the moment. Screenshot 2021-06-04 at 10.25.25

Parts are welded and don’t work.

Weld all of the parts inside of the “Part” to the Part

And set the primary part as “Part” (not really necessary but whatever)

Also i dont see that they have an instance called “Weld”

i didn’t told her to weld it, but okay stop i am not going to get involved to an argument

https://gyazo.com/20edc50f6ddc238a398b215dd2c4c5db

umm

Can you show me the current model?