Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How would I modify this script to work with textbuttons?

Asked by 10 years ago

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

Log in to vote
1
Answered by
Hybric 271 Moderation Voter
10 years ago
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)
0
Thank you. That was simple enough ;3 SchonATL 15 — 10y
Ad

Answer this question