Image Button Script not updating Images

Quick Info: Local Script is in game.StarterGui.ScreenGui.ImageButton

Expected Behavior: Images swap.

What Happens: Image’s disappear and doesnt swap.

Script

local soundgroup = game:GetService("SoundService").SoundGroup
local button = script.Parent

button.MouseButton1Click:Connect(function()
	if soundgroup.Volume ~= 0 then
		soundgroup.Volume = 0
		button.Image = "rbxassetid://176572749"
	else
		soundgroup.Volume = 0.5
		button.Image = "rbxassetid://176572848"
	end
end)

What’s happening? Did I format it wrong?

Wow, I messed with properties and saw that the id went back by one. So I just had to subtract the id by one, how weird.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.