I’m trying to figure out how to keep a roblox character from looking at an object when they are standing above it since it causes some undesirable things.
I have tried using different methods I found on the devhub, but none of the ones I found have what I am looking for. Right now I’m using CFrame.fromMatrix but I still have the problem.
The script that I made is supposed to lock onto another character with the player’s humanoidrootpart facing the character they are locking onto.
I’m still a little unsure what you’re talking about. What specifically is the “undesirable” behavior being shown through the link? Are you talking about the rotation of the character model about its relative x-axis (forward and backward tilt)?
in the character there are motor6D which connect parts together did you try changing the C0 of motor6D uppertorso so that if the C0 cframe angles is greater or less than then you can do stuff
So like @dthecoolest said, you can multiple by Vector3.new(1,0,1) to eliminate the Y portion of a vector. In order to balance the root part, have the lookAt on a level plane: