Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How To Change Image Label/Button On Click?

I need this for a mute button and i cant seem to find out the error (No Output Errors) . This is the code:

script.Parent.MouseButton1Click:connect(function()
--My Music Mute Script Here--
script.Parent.Image = 0 --Image Goes ID here--
end)

1 answer

✓ Accepted answer

Hi Christopher_magical!

You need to add rbxassetid:// to the Asset ID (The Asset ID are the numbers). I also recommend using :Connect() instead of :connect()

Try this:

local id = 0 --put your id there
script.Parent.MouseButton1Click:Connect(function()
   script.Parent.Image = "rbxassetid://"..id
end)

Hope I helped, LennyPlayzYT

1 comment

0

Thanks Dude It Works!

This discussion is preserved as it was. New answers, comments, and votes are closed.