For some reason my pets are flickering at some points for no reason. This is not a one time bug either, it happens a lot. And it appears it replicates to other clients as well with the flickering.
Btw everything is anchored and this flickering it does in the video is only the polite version of it. Sometimes it is even worse than this and can cause epilepsy.
--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:
A private message is associated with this bug report