Hi I’m working on a plane system but currently experiencing the good ol’ Shaky bug from the Mouse.Hit - Does anyone know how I can avoid this? I’ve attached my basic flight structure and a video demonstrating what I want to avoid. I’ve been working on this for close to 2 days now and got no where.
Thank you in advance!
while ModuleUtil do wait()
local onStatus = Main:GetAttribute("onStatus")
if onStatus == "Idle" then
BodyVelocity.Velocity = PrimaryPart.CFrame.LookVector * Speed
local bank = ((((Mouse.ViewSizeX/2)-Mouse.X)/(Mouse.ViewSizeX/2))*MaxBank)
bank = (bank < -MaxBank and -MaxBank or bank > MaxBank and MaxBank or bank)
BodyGyro.CFrame = (Mouse.Hit*CFrame.Angles(0,0,math.rad(bank)))
if PilotSeat.Throttle == -1 then
if Speed > -10 then
Speed -= 1
end
elseif PilotSeat.Throttle == 1 then
if Speed < MaxSpeed then
Speed += 1
end
end
end
end