DR1FTTR
(everett)
June 13, 2021, 3:02am
#1
Im trying to make a image button change on click and its not working LOL. Im losing brain cells at this point so please help xd.
local pause = "3192517633"
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Image = "rbxassetid://"..pause
end)
1 Like
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Image = "rbxassetid://3192517633“
end)
Why couldn’t you just do this? Also, ensure the image is working.
1 Like
I tried it with multiple images, it still won’t work tho, perhaps he’s using a LocalScript instead of a ServerScript?
1 Like
Does not truly matter unless he wants everyone to see it.
1 Like
Spooce
(Spooce)
June 13, 2021, 3:35am
#5
You need to use the image ID associated with your decal when setting the Image
property. There isn’t an obvious way to find this information on the website, but this article will show you how to do so in Studio.
In this case, the ID you’re looking for is 3192517628
.
2 Likes
DR1FTTR
(everett)
June 13, 2021, 2:19pm
#6
Because I have tried that and still nothing happens.
1 Like
DR1FTTR
(everett)
June 13, 2021, 2:20pm
#7
I am using a local script since the image is on a image button, but that shall not matter.
1 Like
DR1FTTR
(everett)
June 13, 2021, 2:31pm
#8
Thanks! I just looked into and realized that. Since I needed the image ID not the Decal ID.
1 Like