You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Hello,So I want my player to move forward,Using mouse.Hit.p to change into direction
**What is the issue?**Im not sure how to start,The player is not confined on one axis and the teleportation must use local dir = (pos - script.Parent.Parent.Head.Position).Unit but im not sure how to implement into teleportation foward
What solutions have you tried so far? ive try dev hub but the closes thing is PivotTo which dont work as expected
here’s my current code
local dir = (pos - script.Parent.Parent.Head.Position).Unit
local currentPivot = script.Parent.Parent:GetPivot()
script.Parent.Parent:PivotTo(dir * CFrame.new(0, 0, -10))
Personnaly i would use the LookAt cframe to displace your char through his HumanoidRootPart. Something like:
HRP.CFame = CFrame.new(mouse.Hit.P, HRP.Position)