The humanoid doesn't move to a specified part

Hello, developers.

So I was making an entity that only goes to the specified part, but the model doesn’t move. The model is unanchored.

Script:

local Entity = script.Parent

local anim = Entity:FindFirstChildOfClass("Humanoid"):WaitForChild("Animator")
if anim then
	local animation = Instance.new("Animation", anim)
	animation.AnimationId = "rbxassetid://17482324339"

	local animTrack = anim:LoadAnimation(animation)
	animTrack:Play()
end

task.wait(10)
while task.wait(0.1) do
	Entity.Humanoid:MoveTo(game.ReplicatedStorage.LatestRoom.Value.exit.Position, game.ReplicatedStorage.LatestRoom.Value.exit)
end

When you begin to type :MoveTo() it should show what is being passed to that function. Also please don’t do while task.wait(0.1) do this is bad practice.
Also I think the real problem here is you are having the MoveTo command go to replicatedstorage.
RS is no where, it doesn’t actually exist in the game when it is running. This is a space for your game to have things you don’t want to be loaded yet. Then you call them to load. Make your MoveTo go to an actual part in the workspace (make sure the part is anchored and set transparency to 1). This should fix it.

1 Like

Solved and fixed it myself, the HumanoidRootPart was anchored, I unanchored it and the model moved.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.