✓ Accepted answer
You could try something like:
local image = game.Workspace.ImagePart.DECAL
local button = script.Parent
function Clicked()
if image.Texture == "http://www.roblox.com/asset/?id=" then
wait(0.05)
image.Texture = "http://www.roblox.com/asset/?id="
else
wait(0.05)
image.Texture = "http://www.roblox.com/asset/?id="
end
end
button.MouseClick:Connect(Clicked)
Basically, the script is creating a function ( which you could change to whatever you want ), and then when they click the part then it'll change the image using an if statement. The if statement is asking " is the image set to the default image?", if not then it'll change the image to the other decal but if the decal isn't set to the default image then it'll change it back to the default image.
( sorry if that didn't make sense, I tried my best explaining )
If this script doesn't work for your case or the script isn't exactly what you're looking for then comment it and I'll try to help more.
2 comments
Had to change it up a bit, but it works. Thanks!
your welcome! I'm happy it worked!!