I have a tool, whenever the player clicks it a part shoots off to where the mouse is aiming out in the workspace, and once that part touches a another part in the workspace, it will make the player teleport to that part position. My problem is whenever the player starts to teleport to the part, the player would not teleport to the part but appear on the ground as shown in the video.
Also the Part orientation gets messed up during the process going in the wrong direction in the first click of the mouse, what am i doing wrong?
https://gyazo.com/920a1eaee5747ae123b597a9600bd96f
Here’s the code.
warpcloned.Parent = game.Workspace
force.Parent = warp
warpcloned.CFrame = (tool.Handle.part.CFrame * CFrame.new(0,0,-2.25))
force.MaxForce = Vector3.new(95000,95000,95000)
force.Velocity = CFrame.new(tool.Handle.part.Position,mouseaim).lookVector * 55
warpcloned.CFrame = player.Character:FindFirstChild("SwordStrike").Handle.part.CFrame
local Rotation2 = player.Character:FindFirstChild("Right Arm").Orientation
warpcloned.Orientation = Rotation2
warpcloned.CanCollide = false
wait(00.9)
warpcloned.CanCollide = true
warpcloned.Touched:Connect(function()
print("touched")
warpcloned.Anchored = true
player.Character.Torso.Position = warpcloned.Position
wait()
player.Character.Torso.Anchored = false
end)