How to make a character temporarily face one way

Hello developers, I’m once again asking for you help.

—// Problem \—
So there’s an issue I’ve just encountered today, I’ve made a move where a player stomps on the victim’s head (it might sound pretty disturbing but I assure you, it’s not as horrifying as it sounds), the problem is that when a player uses shiftlock, the character faces the direction the camera is pointing at instead of just facing forward.

This is how I want the character to look like when the move is used:
https://gyazo.com/5a578601f01a130c25593f7865620426

Please ignore the move, the one I’m talking about is how the character is just temporarily facing forward and faces the direction you move after the attack finishes.
I apologise for the vague amount of information

Any kind of help would be appreciated.

1 Like

Do you have a script which you could provide?

	--// Cooldown and Performing Check\\--
	if HeadSlamCD.Value == true or PerformingAction.Value == true or Stunned.Value == true or Fainted.Value == true then return end
	--// Applying the Changes\\--
	Change(HeadSlamCD, true)
	Change(PerformingAction, true)
	IFrameandPerformance:FireServer("IFrame", 6)
	playAnim(8350164978)
	task.wait(.5)
	local boopyve = Instance.new("BodyVelocity")
	boopyve.MaxForce = Vector3.new(100000, 0, 100000)
	boopyve.P = math.huge
	boopyve.Velocity = Hrp.CFrame.lookVector * 50
	boopyve.Parent = Chr.HumanoidRootPart
	game.Debris:AddItem(boopyve, 0.1)
	coroutine.resume(coroutine.create(function()
		fovadjuster.Adjust(120,0.3)
		wait(.5)
		fovadjuster.Adjust(70,0.4)
	end))
	AnchoredEvent:FireServer("Cancollide", Rarm, true)
	coroutine.resume(coroutine.create(function()
		for _ = 1, 6 do
			task.wait()
			GrabHitbox(Rarm, Rarm.CFrame * CFrame.new(0, -1, 0) * CFrame.new(math.random(-0.25, 0.25), math.random(-0.25, 0.25), math.random(-0.25, 0.25)) ,3, 1, 1, 0.25, Hrp.CFrame.lookVector * 0, "rbxassetid://580201163", 0.075, Color3.new(1, 1, 1), 6690141385, 2, "Light Attack")
		end
	end))
	task.wait(1)
	if Chr:FindFirstChild("HasGrabbedAPlayer") then
		local screengui =  script.Cutscene:Clone()
		screengui.Parent = PlayerGUI
		game.Debris:AddItem(screengui,5)
		coroutine.resume(coroutine.create(function()
				local Camera1 = game.Workspace.CurrentCamera
				repeat task.wait()
					Camera1.CameraType = Enum.CameraType.Scriptable
				until Camera1.CameraType == Enum.CameraType.Scriptable
				Camera1.CFrame = Chr:WaitForChild("Position"):WaitForChild("One").CFrame
			game:GetService("TweenService"):Create(Camera1, TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {CFrame = Chr:WaitForChild("Position"):WaitForChild("Two").CFrame}):Play()
				task.wait(1.3)
			game:GetService("TweenService"):Create(Camera1, TweenInfo.new(0.35, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {CFrame = Chr:WaitForChild("Position"):WaitForChild("Three").CFrame}):Play()
			    task.wait(1.3)
			game:GetService("TweenService"):Create(Camera1, TweenInfo.new(0.35, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {CFrame = Chr:WaitForChild("Position"):WaitForChild("Two").CFrame}):Play()
			    task.wait(1.3)
				Camera1.CameraType = Enum.CameraType.Custom
		end))
		playAnim(8682787098)
		coroutine.resume(coroutine.create(function()
			for _ = 1, 2 do
				task.wait()
				damage(Rleg, Rleg.CFrame * CFrame.new(0, -1, 0) * CFrame.new(math.random(-0.25, 0.25), math.random(-0.25, 0.25), math.random(-0.25, 0.25)) ,9, 10, 1, 0.25, Hrp.CFrame.lookVector * 0, "rbxassetid://580201163", 0.075, Color3.new(1, 1, 1), 6690141385, 0, "Heavy Attack", "No")
			end
		end))
		local camera = workspace.CurrentCamera
		local CameraShaker = require(game.ReplicatedStorage.Modules.CameraShaker)
		local camShake = CameraShaker.new(Enum.RenderPriority.Camera.Value,function(shakeCFrame)
			camera.CFrame = camera.CFrame * shakeCFrame
		end)

		camShake:Start()
		--// 1st Stomp
		LightingBloomEffect()
		SoundEvent:FireServer(264084213, 3, 0)
		GroundHandlersEvent:FireServer("SuperHumanSlam")
		camShake:Shake(CameraShaker.Presets.Explosion)
		task.wait(1)
		playAnim(8682787098)
		coroutine.resume(coroutine.create(function()
			for _ = 1, 2 do
				task.wait()
				damage(Rleg, Rleg.CFrame * CFrame.new(0, -1, 0) * CFrame.new(math.random(-0.25, 0.25), math.random(-0.25, 0.25), math.random(-0.25, 0.25)) ,9, 10, 2, 0.25, Hrp.CFrame.lookVector * 0, "rbxassetid://580201163", 0.075, Color3.new(1, 1, 1), 6690141385, 0, "Heavy Attack", "No")
			end
		end))
		local camera = workspace.CurrentCamera
		local CameraShaker = require(game.ReplicatedStorage.Modules.CameraShaker)
		local camShake = CameraShaker.new(Enum.RenderPriority.Camera.Value,function(shakeCFrame)
			camera.CFrame = camera.CFrame * shakeCFrame
		end)

		camShake:Start()
		--// 2nd Stomp
		LightingBloomEffect()
		SoundEvent:FireServer(264084213, 3.3, 0)
		GroundHandlersEvent:FireServer("SuperHumanSlam")
		camShake:Shake(CameraShaker.Presets.Explosion)
		task.wait(1)
		playAnim(8682787098)
		coroutine.resume(coroutine.create(function()
			for _ = 1, 2 do
				task.wait()
				damage(Rleg, Rleg.CFrame * CFrame.new(0, -1, 0) * CFrame.new(math.random(-0.25, 0.25), math.random(-0.25, 0.25), math.random(-0.25, 0.25)) ,9, 15, 2, 0.25, Hrp.CFrame.lookVector * 0, "rbxassetid://580201163", 0.075, Color3.new(1, 1, 1), 6690141385, 0, "Heavy Attack", "No")
			end
		end))
		local camera = workspace.CurrentCamera
		local CameraShaker = require(game.ReplicatedStorage.Modules.CameraShaker)
		local camShake = CameraShaker.new(Enum.RenderPriority.Camera.Value,function(shakeCFrame)
			camera.CFrame = camera.CFrame * shakeCFrame
		end)

		camShake:Start()
		--// 3rd Stomp
		LightingBloomEffect()
		SoundEvent:FireServer(264084213, 4, 0)
		GroundHandlersEvent:FireServer("SuperHumanSlam")
		camShake:Shake(CameraShaker.Presets.Explosion)
		AnchoredEvent:FireServer("Cancollide", Rarm, false)
	end
	--// Cooldown\\--
	coroutine.resume(coroutine.create(function()
		Change(PerformingAction, false)
		task.wait(2)
		Change(HeadSlamCD, false)
	end))
end

The script is really messy, I’m planning on making it more neat in the future.

1 Like

killerHrp.CFrame = CFrame.lookAt(killerHrp.Position, victimHrp.Position)

Here’s a general gist of what you need to implement, this will face the killer’s character in the direction of the victim’s character.

This is the grab script:

function tagHumanoid(humanoid, player)
	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = player
	creator_tag.Name = "creator"
	creator_tag.Parent = humanoid
end

function untagHumanoid(humanoid)
	if humanoid ~= nil then
		local tag = humanoid:findFirstChild("creator")
		if tag ~= nil then
			tag.Parent = nil
		end
	end
end

-- bool 
local humantouched = false
--// Hold \\--
game.ReplicatedStorage.Main.SpecialMoves.Grab.OnServerEvent:Connect(function(player, move, guy, length)
	local Chr = player.Character
	local Hrp = Chr.HumanoidRootPart
	local leftarm = Chr["Left Arm"]
	local enemychr = guy
	local Shockedvalue = guy.Values:FindFirstChild("PerformingAction")
	local hum = guy:FindFirstChild("Humanoid")
	
	--// Client Fire Events \\--
--	local HeadStompClient = game.ReplicatedStorage.Remotes.Client.Beatdown.SuperHuman.HeadStomp
--	local BlockBreakClient = game.ReplicatedStorage.Main.SpecialMoves.GuardBreakClient
--	if guy.Values.IFrame == true then return end
	
	if move == "FallenHuman(SuperHuman)" and humantouched == false then
		if Chr:FindFirstChild("HasGrabbedAPlayer") then return end
		task.wait(.3)
		local HasGrabbedString = Instance.new("StringValue", Chr)
		HasGrabbedString.Name = "HasGrabbedAPlayer"
		game.Debris:AddItem(HasGrabbedString, length)
		humantouched = true
		local GHrp = guy.HumanoidRootPart
		Hrp.Position = GHrp.Position + GHrp.CFrame.LookVector * 0.5
		coroutine.resume(coroutine.create(function()
			while true do
				if hum.Health <= 10 then
					Hrp.Anchored = false
				end
				task.wait(.6)
			end
		end))
	local holding = false
	local animation = Instance.new("Animation", enemychr.HumanoidRootPart)
		
		if hum.Health >= 10 then
	coroutine.resume(coroutine.create(function()
guy:WaitForChild("Humanoid")
				Hrp.Anchored = true
				task.wait(length)
		holding = true
	if hum.Health >= 10 then			
	guy.Humanoid:LoadAnimation(script.Animation):Stop()
			Hrp.Anchored = false
		end
	end))
	animation.AnimationId = "rbxassetid://8682410021"
	local anima = guy.Humanoid:LoadAnimation(animation)
		anima:Play()
		--[[
		coroutine.resume(coroutine.create(function()
			task.wait(.9)
			hum:TakeDamage(5)
			Chr.Values.ComboCount.Value = Chr.Values.ComboCount.Value + 1
			task.wait(1.5)
			hum:TakeDamage(7)
			Chr.Values.ComboCount.Value = Chr.Values.ComboCount.Value + 11
			task.wait(1.3)
			hum:TakeDamage(10)
			Chr.Values.ComboCount.Value = Chr.Values.ComboCount.Value + 1
		end))
		--]]
	repeat
		Hrp.CFrame = CFrame.lookAt(Hrp.Position, GHrp.CFrame)		
		GHrp.Anchored = true
		Shockedvalue.Value = true
		task.wait()
			Hrp.Position = GHrp.Position + GHrp.CFrame.LookVector * 0.5
	until holding == true or hum.Health <= 10
	
	GHrp.Anchored = false
	Shockedvalue.Value = false
			anima:Stop()
			humantouched = false
		end
	end
end)
1 Like

Apologies, I didn’t mean “victimHrp.CFrame”, I meant “victimHrp.Position” instead.

1 Like

It still does not seem to work

https://gyazo.com/02978f04e0333f6c2640c7249f8a9559

1 Like

I’m not sure what you mean, the killer’s character appears to be facing the victim’s character.

If you need this to occur for some length of time then you’ll need to do it within a loop until the move has ended.

Again, it was just an example of what you should be doing, assuming you want the killer’s character to face the victim’s character.

1 Like

Yes, but the character faces a difference direction when I use shiftlock.

Then you could perform the operation within a loop to circumvent that, and then close the loop once the move has finished.

Sorry if this is already solved but try Humanoid.AutoRotate?