How can I make a changing decal on mouse click?
Where would I put the script? ( in the part, workspace, server script service? )
Local Script or Regular Script?
I tried this to see if I could make it wait 30 seconds but it didn't work.
01 01 function click() 02 02 while true do 03 03 Decal1.Texture.Decal.Texture="rbxassetid://1568188388"--Copy this line and the one below it for more pictures 04 04 wait(5) 05 05 script.Parent.Decal.Texture = "rbxassetid://1571532370"--Edit for your textures asset Id. 06 06 wait(5) 07 07 script.Parent.Decal.Texture = "rbxassetid://1571532122" 08 08 end 09 09 end 10 10 script.Parent.ClickDetector.MouseClick:connect(click)
Ok so here's what you need to do.
First, create 3 decals instead of one inside the part. (For example)
Name them each D1, D2, D3.
Set each of the image id's in the decals's texture
Set the D2 and D3's transparency to 1.
Right click the part in Explorer > Insert Object > Click Detector.
Then do the same thing for the server script, (aka Script) and insert that too with this code:
TL;DR: Create three Decals, name them each D1, D2, D3. Set the D2 and D3's transparency to 1. Set the image id's into the texture value. Insert click detector, and insert normal script with this code.
script.Parent.D1.Transparency = 0 function click() while true do script.Parent.D1.Transparency = 0 script.Parent.D3.Transparency = 1 wait(30) script.Parent.D2.Transparency = 0 script.Parent.D1.Transparency = 1 wait(30) script.Parent.D3.Transparency = 0 script.Parent.D2.Transparency = 1 wait(30) end end script.Parent.ClickDetector.MouseClick:connect(click)
Hopefully this code works for you! It should because I tested it. PS: Please tell me if there is any other easier way if possible. EDIT: Made minor mistakes but they should be fixed.