I already got the basics down, what I am trying to do now is move the plr's location to be right in front of the target.
script.Parent.MouseButton1Click:Connect(function() local plr = game.Players.LocalPlayer local targetName = script.Parent.Parent.TextBox.Text local target = game.Players:findFirstChild(targetName) local human = plr.Character.Humanoid end)
you can take your characters primary part and cframe it to be in front of the targets primary part.
local targetCFrame = target.Character.PrimaryPart.CFrame:ToWorldSpace(CFrame.new(0,0,-5)) plr.Character:SetPrimaryPartCFrame(targetCFrame)
if youre unfamiliar with CFrames, the :ToWorldSpace() basically takes its argument to be the relative displacement from the targets character cframe and outputs corrosponding workspace cframe for you to use for positioning your character. i made it to be 5 units in front of the target, but you can play with that number to be whatever you like