RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Let the player character face direction of the X-Axis, show me how and where to insert it."
-- local script local player = game.Players.LocalPlayer local character = player.Character local humanoid = character:WaitForChild("Humanoid") humanoid.AutoRotate = false -- disable automatic rotation local function faceXAxis() local xDirection = Vector3.new(1, 0, 0) -- direction of the X-Axis local lookAtPosition = character.HumanoidRootPart.Position + xDirection character.HumanoidRootPart.CFrame = CFrame.new(character.HumanoidRootPart.Position, lookAtPosition) end game:GetService("RunService").Heartbeat:Connect(faceXAxis) -- call the function every frame