The script I made for creating a wave and tweentping it in front of a player doesnt work as intented I want it to dont rotate in any direction besides Y when setting the start position but yet it does rotate in diffrent ways
It almost looks like you are running into what’s called Gimbal lock. CFrame orientation causes issues when you rotate an object so its angles are multiples of 90 degrees. This is because if you rotate something on one axis the other 2 axes now align and will mess each other up.
Search for ‘gimbal lock’ in the forums. They explain it better than I can and have Solutions to the issue.
I don’t know a whole lot about it, I’ve just read those posts and know that this could be an issue. Have a look at the way the other posts were Solved.
Not sure.
I’ve seen comments about not CFraming using XYZ and using YXZ (or something like that, I don’t recall exactly) or also using Quaternions to get rid of it entirely. Rotate objects with QUATERNIONS | Definitive guide
I barely understand the theory behind it, but how to get it to work is beyond me…