You might want to use 'Humanoid.MoveToFinished` aswell to prevent issues if you have multiple parts to approach.
Example:
local parts = game.Workspace.Parts:GetChildren()
local Humanoid = script.Parent
for _,part in pairs(parts)
Humanoid:MoveTo(part.Position)
Humanoid.MoveToFinished:Wait()
end
im currently using this, but it says that it indexed nil with name
function CookingModule.WalkToFridge(destination, player)
local Humanoid = script.Parent
workspace:FindFirstChild(game.Players.LocalPlayer.Name).Humanoid:MoveTo(destination.Position)
Humanoid.MoveToFinished:Wait()
end
also, question. it works, but when the player’s speed is set to 0, it won’t move. can u help me make it so that when the speed is 0, the player still moves.