Tool = script.Parent
function onTouched(hit)
if hit.ClassName == "Part" then
local Humanoid = script.Parent.Parent.Parent.Parent:WaitForChild("Humanoid")
if Humanoid then
Humanoid:MoveTo(hit.Position)
end
return;
end
end
Tool.Touched:connect(onTouched)
The script above works perfectly fine, although, at the part:
Humanoid:MoveTo(hit.Position)
I'm not getting any errors, it's just the player moves towards that location rather than teleporting to that position, not sure why it does this. Any help would be useful.

1 comment
I want the player to teleport to the .hit which is why I am asking the question.