I want to make a script that when you press x, your character automatically runs in the direction its facing. I've tried all sorts of things and I can't figure it out. Does anyone know how to do this? (sorry for my bad grammar, I couldn't think of another way to explain it)
here:
--first the when x is pressed then local h = game.Players.LocalPlayer.Character.Humanoid if h~=nil then h.Torso.CFrame = CFrame.new(0,0,0) -- Place A Position Here, You can put (players Position) + (100,0,0)
local plr = game.Players.LocalPlayer game:GetService("UserInputService").InputBegan:Connect(function(key,isTyping) if isTyping == false and key.KeyCode == Enum.KeyCode.X then local movePosition = plr.Character.HumanoidRootPart.CFrame:ToWorldSpace(CFrame.new(0,0,-100).p plr.Character:WaitForChild("Humanoid"):MoveTo(movePosition) end end)