function OnClick() local UnMuted =script.Parent.Parent.UnMuted local Muted =script.Parent.Parent.Muted if script.Parent.Parent.ImageButton.Image == UnMuted then script.Parent.Parent.FireSound:Stop() script.Parent.Parent.ImageButton.Image = Muted elseif script.Parent.Parent.ImageButton.Image == Muted then script.Parent.Parent.FireSound:Play() script.Parent.Parent.ImageButton.Image = UnMuted end end script.Parent.MouseButton1Click:connect(OnClick)
Where the Items are located -->http://prntscr.com/9rpzxt
Anyone know what the problem is? :c
Problem: The Images Won't change and the sound won't stop!
PS: The Mute and Unmute buttons are string vallues with the texture id's
You are forgetting to place the Value in both Muted and UnMuted.
function OnClick() local UnMuted =script.Parent.Parent.UnMuted local Muted =script.Parent.Parent.Muted if script.Parent.Parent.ImageButton.Image == UnMuted.Value then script.Parent.Parent.FireSound:Stop() script.Parent.Parent.ImageButton.Image = Muted.Value elseif script.Parent.Parent.ImageButton.Image == Muted.Value then script.Parent.Parent.FireSound:Play() script.Parent.Parent.ImageButton.Image = UnMuted.Value end end script.Parent.MouseButton1Click:connect(OnClick)