I’m creating a creature and I need to make an outline for that creature every few seconds. When I created the outline though, it does this weird flickering thing on the mesh that’s cloned; what’s weirder is that it only happens locally and isn’t visible on the server.
https://gyazo.com/27e3826bccefb57a1ef2819d00fa973e
I’m not sure if this problem is caused by an engine bug or my code, but regardless here is a section of the code that handles outlining the creature.
function Creature:createEcho()
local replicateTable = {}
local echoOutline = bodyOutline:Clone()
local bones = echoOutline:GetDescendants()
for i, v in pairs(self.body:GetDescendants()) do
bones[i].WorldCFrame = v.WorldCFrame
end
table.insert(replicateTable, echoOutline)
for _, v in pairs(self.limbs) do
if v.val == "FR" or v.val == "FL" then
echoOutline = frontLegOutline:Clone()
elseif v.val == "BR" or v.val == "BL" then
echoOutline = backLegOutline:Clone()
else
warn("Couldn't create an echo because val wasn't set!")
return
end
bones = echoOutline:GetDescendants()
for i, k in pairs(v.leg:GetDescendants()) do
bones[i].WorldCFrame = k.WorldCFrame
end
table.insert(replicateTable, echoOutline)
end
for _, v in pairs(replicateTable) do
v.Parent = workspace
TS:Create(v, echoFadeInfo, {Transparency = 1}):Play()
Debris:AddItem(v, ECHO_TIME)
end
end
I’ve tried searching the devfourm for mesh flickering and suspect it may be a bug, but I haven’t seen any examples as bad as this which leads me to believe I may be doing something wrong.