https://www.youtube.com/watch?v=9B5cE0NavkY&feature=youtu.be
Up there is a video of what is happenining
Down below is the Local Script that I thought would work.
01 | local Button = script.Parent |
02 |
03 | local ImageActivated = "rbxassetid://5049442176" |
04 | local ImageNormal = "rbxassetid://4888438209" |
05 |
06 | local function OnButtonActivated() |
07 | Button.Image = ImageActivated |
08 | delay( 3 , function () |
09 | Button.Image = ImageNormal |
10 | end ) |
11 | end |
12 |
13 | Button.Activated:Connect(OnButtonActivated) |
14 |
15 | if parent.Image = = ImageActivated then parent.Selectable = false |
16 | end |
17 | end |
ImageActivated hasnt been approved from ROBLOX yet because I had just made the decal that is why it is black i think
**I mean you literally answered your question yourself.
"ImageActivated hasnt been approved from ROBLOX yet because I had just made the decal that is why it is black i think"
I tested it for you. It works, just not yet with those decals.
The code is great. Good job!**
Edit: I'm wrong.
When I went to your video I was puzzled as to why it wouldn't work on my screen at all but it somewhat worked on yours. So I did some research.
I tested it with my decals. I got the asset ID by putting my decals/images on a decal object in-game. That's why I jumped to my answer that I originally had.
To get a real asset ID you go to your link here: https://www.roblox.com/library/4888438209/Images-about-to-throw-die and paste that into the "texture ID" area for a Decal object in studio.
The decal object will then auto-correct to the right ID (it will clearly say it). That is how you know what to use.
Sorry about that.
01 | local Button = script.Parent |
02 | local ImageActivated = "rbxassetid://5049442168" -- these are the correct assetid's |
03 | local ImageNormal = "rbxassetid://4888438200" |
04 | Button.Image = ImageNormal -- this makes it so the image is image normal to begin with |
05 | function OnButtonActivated() |
06 | Button.Image = ImageActivated |
07 | delay( 3 , function () |
08 | Button.Image = ImageNormal -- the function is last changed to image normal |
09 | end ) |
10 | end |
11 |
12 | Button.MouseButton 1 Click:Connect(OnButtonActivated) -- for some reason I couldn't get .Activated to work but mousebutton1click worked. |