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

Not active TextButton still pressable?

Asked by
Mokiros 135
9 years ago

I have SurfaceGui with TextButton on it. And when button becomes inactive, it still can be pressed. How do i make the button not pressable?

function click()
    script.Parent.Active = false
    print("Button pressed!")
    wait(5)
    script.Parent.Active = true
end

script.Parent.MouseButton1Click:connect(click)

2 answers

Log in to vote
2
Answered by 9 years ago

Try this

function click()
    script.Parent.Active = false
    script.Parent.Visible = false
    print("Button pressed!")
    wait(5)
    script.Parent.Visible = true
    script.Parent.Active = true
end

script.Parent.MouseButton1Click:connect(click)


0
Wow... you just fixed AgentL3r's script... you so sm4rt... Mokiros 135 — 9y
0
Well if your more smart than us, why do you have a problem with this script? TextWaffles 30 — 9y
Ad
Log in to vote
0
Answered by 9 years ago
function click()
script.Parent.Active = false
script.Visible = false
print("Button pressed!")
wait(5)
script.Visible = true
script.Parent.Active = true
end
script.Parent.MouseButton1Click:connect(click)

Try that.

:o)

0
Umm.... make SCRIPT invisible? Mokiros 135 — 9y

Answer this question