#:MoveTo teleports player rather than makes player walk to destination

15 messages · Page 1 of 1 (latest)

azure basalt
#

CharacterScript:

local Ve3 = Vector3.new

local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
local onLeftClick = mouse.Button1Down

onLeftClick:Connect(function()
    plr.Character:MoveTo(Ve3(mouse.Hit.X, mouse.Hit.Y, mouse.Hit.Z))
end)

The Only Other Active Script (LocalScript):

local twait = task.wait
local Ve3 = Vector3.new

local plr = game.Players.LocalPlayer

-- Disable Regular Movement
local PlayerModule = require(game.Players.LocalPlayer.PlayerScripts:WaitForChild("PlayerModule"))
local Controls = PlayerModule:GetControls()
Controls:Disable()

local ClickToMovePart = script.ClickToMovePart
ClickToMovePart.Parent = workspace
local mouse = plr:GetMouse() --- Gets Players Mouse
local mX,mY,mZ
while true do
    mX,mY,mZ = mouse.Hit.X,mouse.Hit.Y,mouse.Hit.Z 
    ClickToMovePart.Position = Ve3(mX,mY,mZ)
    twait()
end
potent canopy
#

You can use :MoveTo on a model to teleport it or you can use :MoveTo on a humanoid to make it move

azure basalt
potent canopy
#

i see plr.Character:MoveTo

#

character is a model not humanoid

azure basalt
potent canopy
#

character.Humanoid?

azure basalt
#

thank you

#

YES

#

YES THANK YOU

cloud dome
#

😭

azure basalt
cloud dome
#

icic

azure basalt
#

I haven't worked with players before