It changed nothing, and yes I know the Value is actually changing because I have the properties tab pulled up and I see all the values changing as I click on the part. It is also not throwing any errors so I’m completely at a loss with this.
Are you changing the value on the server side, or the client side?
So I used the 1st Local Script to get the Vector3 then used the Remote to give it to the Server Script which changes the value.
Could you try something for me in the LocalScript that isn’t working?
Try placing a print() on the first line of it, to check if it’s running at all.
Hold up hold up, I moved the Local Script from the dummy and placed it into StarterCharacterScripts and it works… I click on the part and right after my character moves to it…
I guess that would be good but I want the NPC to move to it not me…
Ah I had a feeling that’s what was going on. A LocalScript cannot run in Workspace.
Why would it move to you? Could you share the code with us where you send Pos
?
A couple of things. As @MJTFreeTime mentioned try putting a print() function inside of the .Changed event to make sure that it is firing. Also, is there a specific reason that you need to move the NPC on the client rather than the server? As was just mentioned:
This is likely the issue you are having. The reason placing the script inside of StarterCharacterScripts causes you to move rather than the NPC is because it places the script inside of your character. This means that local Human = script.Parent.Humanoid
points to the humanoid of your player character. If you need the script to run on the client for some reason, try changing that value to directly point to the NPC.
I am just not sure how to use the MoveTo() because I thought that is needed to run with a Local Script but you both say that you cannot do that.
You can in fact use MoveTo() from a server side script, and I would recommend doing that unless there is a specific reason to use it on the client.
EDIT: Try this putting this inside of a regular script that is inside of the NPC character model -
local MTEvent = game:GetService("ReplicatedStorage").MoveToEvent
local Human = script.Parent.Humanoid --Since the script is inside of the NPC model
--Listen for the Vector3 position given by the client
MTEvent.OnServerEvent:connect(function(Ply, Pos)
Human:MoveTo(Pos) --Move the NPC to the Vector3 position
end)