Turret Lags Behind Chassis

  • What are you attempting to achieve? (Keep it simple and clear)
    I am currently working on a tank and I have some basic movements and models down, but the turret is giving me some issues. I currently have only the X-axis down and it works great… Until you start to move. As soon as a move or rotate the chassis, the turret lags behind.
    robloxapp-20220428-1930391.wmv (2.7 MB)
    Movement with Turret

    Attached with a hinge and no contraints

– Target
Aim = workspace.AimPoint
– Turret Body
turret = script.Parent.Turret
– Where turret is attached to
att = script.Parent.Hull.UpperChasis.Attachment1

wait(game.Loaded)
while wait() do
turret.CFrame = CFrame.new(turret.Position, Vector3.new(Aim.Position.X,turret.Position.Y,Aim.Position.Z))
end

The point code I’m using at the moment is in a normal script and I plan to use another script to track player mouse movement and move the targeting box to it later on. If you have another idea of how to do that I would love to hear it.

I had a similar issue when i weld constrained a turret to my boat… it seemed to disable the physical movement of the turret, although the shooting on mouse pointer was never hindered. I couldnt solve the issue mainly because i was using a qweld to keep the boat together and it was interfering with my turret. I ended up disabling the movement of the turret and just using the firing capability.