local CanClick = true script.Parent.MouseButton1Click:connect(function() if not CanClick then return end CanClick = false workspace.Click:Play() wait(.2) script.Parent.Parent.Parent.MusicPlayerReview.PlayReview.Image = "rbxassetid://293466205" CanClick = true end)
How do you make it afterclicking, the player can change the image again and so on.
You could try something like:
local image = game.Workspace.ImagePart.DECAL -- change the variable to what you need local button = script.Parent -- the variable selecting the click detector function Clicked() -- this is only an example so you don't have to copy it exactly if image.Texture == "http://www.roblox.com/asset/?id=" then -- change the id to the default image wait(0.05) -- optional image.Texture = "http://www.roblox.com/asset/?id=" -- insert the 2nd image id here else wait(0.05) -- again, optional image.Texture = "http://www.roblox.com/asset/?id=" -- insert the default image id here 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.
local Image = script.Parent.Parent.ImageLabel Image.MouseButton1Click:connect(function() Image.Image = 'rbxasset://IMAGEIDHERE' end)