Hi!
I am making an “intro-cutscene” effect for my old-style RPG game. In this cutscene there are obviously camera movements (fine), character movements (not fine). As multiple people will be in one server the character movements will need to happen on the client.
The issue here is that my NPC.Humanoid:MoveTo() function is not working at all; it doesn’t provide any error nor stops the script from running, it merely just ignores this line of code:
game.Workspace.Tooby.Humanoid:MoveTo(Vector3.new(-255, 89, 253.5))
-255, 89, 253.5 are the co-ordinates of the red part here (Tooby is the name of the highlighted noob NPC):
I will now provide a chunk of my script around this line of code:
camera.CFrame = cameras:WaitForChild("camera5").CFrame
game.Workspace.Tooby.Humanoid:MoveTo(Vector3.new(-255, 89, 253.5)) -- line of code that doesn't work
CSchat.Chat(player, "GUYS!", "Tooby", 1)
camera.CFrame = cameras:WaitForChild("camera6").CFrame
CSchat.Chat(player, "We've just heard news that a PLAYER has joined the game!", "Tooby", 2)
CSchat.Chat(player, "They are believed to be called " .. player.Name .. ".", "Tooby", 3)
As you can see, “GUYS!” is the dialogue that appears after calling Tooby to walk. (CSchat is a modulescript which just displays the parameters on a GUI).
However, Tooby remains in the same position even when the dialogue after his movement has been shown:
I have searched around the forum but all similar problems seem to have solutions which did not work for me.
I attempted to wrap this line of code in a pcall function to see if anything would show…
local success, err = pcall(function()
game.Workspace.Tooby.Humanoid:MoveTo(Vector3.new(-255, 89, 253.5))
end)
print(success, err)
…but the only thing in output was this:
11:08:08.801 true nil - Client - StartScene:46
Now, I wanted to make sure there wasn’t a problem with the model itself, so I tried to run a MoveTo function on the server using a remote event, and there were no issues. But I need this to be on the client otherwise everyone will see the NPC movement.
I’ve fixed almost all my problems with forums, videos etc… but this… this I have no clue. Maybe I am missing something or this is a Roblox bug?
Thanks.