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

Is it possible to get only one part of an orientation and set a variable to it?

Asked by 5 years ago
Edited 5 years ago

No giant questions with complicated scripts this time. I'm just wondering, is it possible to get only the y part of an orientaion? Or should I just move on to finding a different solution for one of my issues? I know you can do like part.CFrame.X to get the x of the position, but I want the y of the orientation. I've also heard stuff about needing to use lookVector, but I don't entirely understand what lookVector is. I get that it's the direction the part's facing, but if it was printed, what does the number mean?

1
You could not just use: local OrientationY = Part.Orientation.Y ? (I did not quite understand the question. but i tried) yHasteeD 1819 — 5y
0
I've tried that, but sadly no, it doesn't work. I've also tried some more complicated things like, local rX, rY, rZ = part.CFrame - part.Position to get each separate part. It didn't print errors if I remember correctly, but it didn't give me what I was looking for. Knineteen19 307 — 5y
1
Odd, when I tried getting the Y of orientation, it worked for me, well it's probably not the same thing you're looking for, but I got the Y. I'll look into it. Cvieyra2test 176 — 5y
0
I'll try it again, maybe I tried doing something like local rY = (part.CFrame - part.Position).Y or something weird like that. Knineteen19 307 — 5y
0
Well it did something, but it's kind of glitching out, I think that might've been it, but I don't know for sure. Knineteen19 307 — 5y

Answer this question