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

How would I modify this script to work with textbuttons?

Is there any way to modify this script to work with TextButtons?

a = false
script.Parent.ClickDetector.MouseClick:connect(function(player)
if a == false then
game.Workspace.Audio:Play()
a = true
else
game.Workspace.Audio:Stop()
a = false
end
end)

1 answer

✓ Accepted answer
a = false
script.Parent.MouseButton1Down:connect(function(player)
if a == false then
game.Workspace.Audio:Play()
a = true
else
game.Workspace.Audio:Stop()
a = false
end
end)

1 comment

0

Thank you. That was simple enough ;3

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