So i’m extremely new to making fly scripts and i have no idea what’s going on. I’ve been testing around for a couple hours trying to fix this issue with the stuttering and i dont know what is the issue. I’m trying to make my lockon system compatible with my flight system and it’s pushing me backwards whenever i come close to the player.
I would be very thankful if anyone could tell me what i am doing wrong and how this is happening.
Also the thing where it just changes up completely when i come close is just my ground check if i’m in the air or not. So that’s not the issue.
Looks like a classic HumanoidStateType issue (these are usually pretty annoying). Roblox applies forces on your character based on the HumanoidStateType to keep it upright, so your body gyro is kinda wrestling against those forces whenever your character is on an angle (causing the shaking). Try changing the HumanoidStateType to Physics by doing Humanoid:ChangeState(Enum.HumanoidStateType.Physics) on the client to disable those forces (this may cause issues if you bump into parts however, not entirely sure) (also you’re gonna want to make sure you change the state back to Running when you’re done flying)
edit: emphasis that this must be done on the client, since you cannot change the state of a character that isn’t owned by the same network
I can’t speak for him, but I’m having a similar issue with my Flight + Lock On Systems and regardless of PlatformStand, AutoRotate, or Physics state changes/manipulations the stutter still exists. I’ve been kind of stumped on this issue myself for about a day now.
I just recently made custom swimming for a game so I can sympathize with how painful this stuff can be
If you have some sort of loop that’s constantly updating your orientation and stuff, I would suggest printing out the current humanoid’s state just as a sanity check to see if it’s actually in the state that you want
I think I’ve fixed the issue with my flight and lock on systems atleast (I think), Wizard DM me if you want me to share with you what fixed it for me and hopefully it can for you to.