(continuing from my previous post) Need more help with making "mute button" for "sound regions" read the text in this page, I'm close to making it

hello there again, incase you didn’t know, I posted one post for peoples to help me with making mute button for Sound region made by HowtoRoblox in youtube, the link to my previous post:
previous post of mute button for sound region by me

read previous post for bit more informations. thanks, and I recommend also watching HowtoRoblox’s sound region video for more understanding.
HowtoRoblox’s sound region video

anyway, I used script that IlIBlock_MANIlI on roblox made with chatGPT but only thing the script did was locating the sound object inside startercharacter local script that getsinjected inside every player models, however even through I pressed the gui button, it doesn’t change the playing value of sound object at all. also this script will mute the sound object of local player, not muting everyone’s sound object.
I am looking for more people that could help me fix the script that IlIBlock_MANIlI shared to me, thank you so much. and also here is repost of script that IlIBlock_MANIlI shared to me.

(IlIBlock_MANIlI's script)

local mutebutton = script.Parent
local playing = true

mutebutton.MouseButton1Click:Connect(function()
	local music = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Sound")
	if music then
		if playing then
			music.Playing = false
			mutebutton.Text = "Unmute Musics"
			playing = false
		else
			music.Playing = true
			mutebutton.Text = "Mute Musics"
			playing = true
		end
	end
end)

I suck at scripting an can’t even understand some of things that this script does, but I get some of point of this script, however there is still error of this script and IlIBlock_MANIlI didn’t responded to me. so any help of fixing the script will be generous, thank you :sweat_smile:

-mari

Well if the issue is that it doesnt stop the music for everyone then youd need to do “RemoteEvents” to transfer the “Mute” from client to server.

Please elaborate what part of the script “Doesn’t” work

2 Likes

it was supposed to stop the music for only one people who have click the mute button. so therefore it does not need remoteEvents, but the problem is now gui button doesn’t change it’s text upon clicking, also the gui button changing means it somehow functioned. but I don’t know how to fix the issue for now.
thank you for responding.

Oooh I see. I am testing it currently and it works. Make sure the issue isnt on your end because a “Sound” Instance needs to be in the player otherwise the text won’t actually change. For example
image
If there is no sound in the player it won’t work. Dont worry about naming

1 Like

ooh my goddddd I freaking did ittttttt

thanks for your amazing help man, now I can finally give inner peace to players who hate sussy music in-game and I can just make that into free model for once and for all and help thousands of players, I will also credit you in credit script in that sound region + mute button model.
so be it, farewell! :hugs: :grin:

1 Like

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