I want to make a mute and unmute textbutton when you click on it, the word changes to unmute and when you press it again, it changes to mute, but idk how to script it, soooooooo can any of yall help me?
Here you go :
script.Parent.Text = "Mute" script.Parent.MouseButton1Click:Connect(function() if script.Parent.Text == "Mute" then script.Parent.Text = "Unmute" elseif script.Parent.Text == "Unmute" then script.Parent.Text = "Mute" end end)
If this helps accept the answer! Let me know if you find any problem or if it's not what you wanted.
Using a TextButton's MouseButton1Down event and its Text property
local Button = (button here); Button.MouseButton1Down:Connect(function() local isText = (Button.Text == "Mute"); -- Is the text "mute?" Button.Text = (isText and "Unmute" or "Mute"); -- If yes then change it to "Unmute", if its not then make it "Mute". end)