:MoveTo() Doesn't move to exact position

I’m making a game where you can fight bosses/zombies etc… The final boss can be transformed by an admin to a even stronger version of it self giving different loot. But Im in a bit of a problem. When I move a moddel to the position of the NPC’s Torso, Naturally Its goes on top of it even though can colide is disabled. Here’s my code

-- Commands
function onChatted(msg, recipient, speaker) 
	-- Convert to all lower case 
		
local Shade = game.Workspace.Shade
	local source = string.lower(speaker.Name)
	msg = string.lower(msg)
	if (msg == "Clockwork") and (speaker.Name) == "KrampusX12" then
    game.ReplicatedStorage.Locksmith.Parent = game.Workspace.Shade
    Shade.Humanoid.MaxHealth = 1000000000000
     Shade.Humanoid.Health = 1000000000000
	  game.ReplicatedStorage.Value.Value = 3
       script.Sound:Play()

game.Workspace.Shade.Torso.Anchored = true
local Clone = game.ReplicatedStorage.Transformation:Clone()
Clone.Parent = game.Workspace
Clone:MoveTo(game.Workspace.Shade.Torso.Position)


		end
			
			end
	

function onPlayerEntered(newPlayer) 
	newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)

end
game.Players.ChildAdded:connect(onPlayerEntered)

Is their an alternative way to send the model to the position of the NPC’s Torso without it bugging or anything

3 Likes

Use instead of the part the actual position like for example,

Clone:MoveTo(1.72, 0.5, 2.98)
2 Likes

Addition to this, get its humanoid first.

humanoid:MoveTo(1.72, 0.5, 2.98)
2 Likes

Their code is completely fine, they’re providing a Vector3 Position to Model::MoveTo. Also, MoveTo takes a Vector3 - not a tuple of numbers.

2 Likes

Sorry, I completely forgot about that.

2 Likes

Adding to replies above, MoveTo() has a second optional argument for specifying a part you want the Humanoid to follow. This is useful for when the part is moving. Just more food for thought.

1 Like

An addition to how it looks like. image
The black figure is the NPC. The configuration should look as if the NPC is in the center.

1 Like

:MoveTo() doesn’t allow you to collide with parts. If you are teleporting them inside a part, you will most likely pop up/down/on the side of it depending where you end up being teleported to (easily explained, to dumb this down, I believe.)

However, SetPrimaryPartCFrame doesn’t have this behavior, use that if you really need to.
Personally, I highly suggest SetPrimaryPartCFrame over any other methods.

1 Like