Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to force Player to Look at a part?

Asked by 5 years ago

I search everywhere for solution , but none is working.

Have you ever play a fighting game ? Dragon ball is a great example , when you press 'Q' the Player 'Lock Look' or 'Target' a specific Enemy,so when ever you move or the target move , the Player will continuously look at the target.

I believe I can use BodyForce , but not CFrame. I tried CFrame.This is my Script.


local Player = game.Players.LocalPlayer repeat wait() until game.Workspace:FindFirstChild(Player.Name) local Character = game.Workspace[Player.Name] while true do wait() Player.Character.HumanoidRootPart.CFrame = CFrame.new(Player.Character.HumanoidRootPart.Position , game.Workspace.Dummy.HumanoidRootPart.Position) end

I Created a CFrame.new(Player Position , Target Position )

The Result is a failure , you can try my script yourself XD

Back to the question , you guys have any ideas how to do it?

Answer this question