Why is my animated decal flickering?

I am making animated blood, and I have a system that preloads and then plays the animation.

playback code:

if playing == true then
					if tick() >= last+frameDelay then
						last = tick()
						if current >= total then
							if self.Looped == true then
								current = 1
							else
								current = total
								bind:Disconnect()
							end
						else
							current += 1
						end
						for i,v in pairs(loaded) do
							if i == current then
								v.Transparency = 0
							else
								v.Transparency = 1
							end
						end
					end
				else
					bind:Disconnect()
				end

but for some reason, I get flickering:


(obs has bad fps for some reason)

The decal is probably slightly inside the wall causing it to flicker like that

Its not, as when its not animated, theres zero flickering.

1 Like

Possibly lag between setting the last decal transparency to 1 and setting the new transparency to 0

1 Like

This fixed it! I made the current visible and then the old invisible instead.

This could also be it glitching inside of the part, so try to make it a little more outside the part.

1 Like

This is already solved, not to mention it’s already 0.1 studs out.

2 Likes

Don’t need to be rude over a reply.

It’s not a rude reply lol. If it came off rude to you, then I’m sorry.

2 Likes

Can you show the changes you made to the script? I’m curious how exactly you fixed it

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.