MoveTo not working in LocalScript? [SOLVED]

I think you can use :

Fox:MoveTo()
1 Like

You’d have to create or clone the fox on the client itself, and then use MoveTo on its humanoid (not its root part) in a localscript, using a position/point (not a CFrame) as the first argument. Additionally, MoveTo takes another argument, which is a part that the point becomes relative to.

For example, if you do Fox:FindFirstChild(“Humanoid”):MoveTo(point, part), then if the part moves, the point will relatively follow it.

Alternatively, if the network owner of the fox is set to the player on the server, then you can move it from a localscript in that player’s client, but in this case all other players will see the fox move, in which case it’d be better and more convenient to move it on the server.

1 Like

I’m probably wrong then but in any case I just use CFrame and not CFrame.position :sweat_smile::grinning:

Local scripts do not replicate stuffs to client without any remote events. If you want to move the fox, you should do this in a server script over local scripts.

1 Like

This teleports the fox to the position, I would like it to slowly move there

1 Like

You should use Humanoid:MoveTo() instead of just manually setting the CFrame to achieve that.

Use TweenService on the HumanoidRootPart.
Also, we need you to tell us your purpose. What you want to do with the fox, on the clients or the server, …

Maybe you are taking the problem the wrong way, so maybe you need to change your technique ? :thinking:

The OP wants the fox to slowly move to the anchored part. Sure, TweenService can help but Humanoid:MoveTo() just takes one function to do all the tricks, assuming it is a straight line to reach that part.

1 Like

When a player joins, I want the fox to slowly move to a part on their screen only.

In this case, you should use tweens over Humanoid:MoveTo() on the client.

1 Like

Ok all I thought that she was using MoveTo() to move the Char’s Position
After seeing the problem again, I think Use MoveTo() on the server is the best since the Fox is on the server side.
Yes, I know that.

The OP wants to achieve movement of the fox on the client, NOT on the server side.

2 Likes

I think it can work :

model = workspace.fox
endPosition = workspace.PointE

model:MoveTo(endPosition)

Thanks, I will try. (3 0 charss)

That doesn’t work. Model classes do not have the :MoveTo() function. Secondly as the OP already mentioned, the fox didn’t move on the client.

1 Like

Actually, it does, but not the function make the character move naturally
https://developer.roblox.com/en-us/api-reference/function/Model/MoveTo
If she uses this, 100% it will happen on the client side, but the problem is it’s not moving, its teleporting

3 Likes

I based it on Model:MoveTo

1 Like

Maybe she need to take the problem otherwise ? :thinking:

I think that in any case the character will teleport ? :thinking: