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

[SOLVED]how do i make an enemy look at me (my old position) when i punch?

Asked by 4 years ago
Edited 4 years ago

how do i make an enemy look at me (my old HumanoidRootPart position) when i punch? no need for the punch script i just want someone to explain the mathematics for me please :) thanks

2 answers

Log in to vote
0
Answered by
emervise 123
4 years ago

I think you will want to use CFrame.LookVector (:

Ad
Log in to vote
0
Answered by 4 years ago

Sorry for late response but ive already solved it i basically did Enemy.HumanoidRootPart.CFrame = CFrame.New (Enemy.HumanoidRootPart.Position, playerCharacter.HumanoidRootPart.Position * Vector3.new(1,0,1) + Enemy.HumanoidRootPart.Position * Vector3.new(0,1,0))

Answer this question