Make character face away from camera

I’m trying to make the character look straight forward and away from the camera (similar to shift lock)

But I haven’t found any ways or methods that can effectively do this

1 Like

local script in startercharacterscripts

local lock = true

game:GetService("RunService").RenderStepped:Connect(function()
    if not lock then return end
    script.Parent.PrimaryPart.CFrame.LookVector = workspace.CurrentCamera.CFrame.LookVector
    script.Parent:PivotTo(script.Parent.PrimaryPart:GetPivot())
end)

LookVector cannot be assigned to error

You can do this (LocalScript in StarterCharacterScripts)

local UIS = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Cam = workspace.CurrentCamera
local Mouse = Player:GetMouse()
local RunService = game:GetService("RunService")
local Allowed = true

RunService.RenderStepped:Connect(function()
	if Allowed then
		UIS.MouseBehavior = Enum.MouseBehavior.LockCenter
		UserSettings():GetService("UserGameSettings").RotationType = Enum.RotationType.CameraRelative
	else
		UIS.MouseBehavior = Enum.MouseBehavior.Default
		UserSettings():GetService("UserGameSettings").RotationType = Enum.RotationType.MovementRelative
	end
end)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.