Players = game.Players.LocalPlayer mouse = Players:GetMouse() mouse.KeyDown:connect(function(key) if key == "t" then xPos = game.Players.LocalPlayer.Character.Torso.Position.X yPos = game.Players.LocalPlayer.Character.Torso.Position.Y zPos = game.Players.LocalPlayer.Character.Torso.Position.Z game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(Vector3.new(xPos,yPos + 50,zPos)) end end)
So I made a script that teleports you up 50 studs but the problem is, when launched('t' is pressed), it takes you up, then makes you face a random direction. No matter what you're looking, when the script is launched, you still face that same,random direction. Any advice on how to fix?
Use :TranslateBy()
It will move the model using the given vector3 value.
player = game.Players.LocalPlayer mouse = Players:GetMouse() game:GetService("UserInputService").InputBegan:connect(function(key) --KeyDown is depreciated if key.KeyCode == Enum.KeyCode.T then --tttttttttt player.Character:TranslateBy(Vector3.new(0,50,0)) end end)