Help with making one decal change to another decal automatically

Hi! I’m making a game where one part has a decal on it, but i need it to change back and forth to a different decal, making a gif with 2 frames. This is what they look like:



(They are slightly different, giving it the wiggly effect when animated)

I’m pretty new to scripting, and i dont really know how to code very well. I’ve tried multiple tutorials on youtube, and none of them seem to work.
any help is appreciated. Thank you :slight_smile:

1 Like
-- Define references to your decals
local decal1 = script.Parent:FindFirstChild("Decal1")
local decal2 = script.Parent:FindFirstChild("Decal2")

-- Check if the decals exist
if decal1 and decal2 then
    while true do
        -- Show Decal 1
        decal1.Transparency = 0
        decal2.Transparency = 1
        wait(1) -- Wait for 1 second

        -- Show Decal 2
        decal1.Transparency = 1
        decal2.Transparency = 0
        wait(1) -- Wait for 1 second
    end
end
1 Like

thanks :slight_smile: ill try this and see if it works

thank you so much! I modified it a tiny bit, but it works great :smiley:

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