For some reason my pets are flickering at some points for no reason. Is this a engine bug or issue with my code or model?
Btw everything is anchored.
--Code responsible for making the pet render
local function MoveTowards(pet, targetCFrame, speed, minDistance, maxDistance, lerpAlpha, deltaTime)
local PetPivot = pet:GetPivot()
if not PetPivot then return end
local distance = math.clamp((targetCFrame.Position - PetPivot.Position).Magnitude, 0, maxDistance)
local alpha = lerpAlpha * distance
pet:PivotTo(PetPivot:Lerp(limitCFrameY(targetCFrame,minY,maxY), alpha))
end
Structure of pet:
Video of it happening: