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

TextButtons not functioning?

Asked by 9 years ago

So, in this normal script it is suppose to change a TextButton and a frame to invisible, while changing another frame to visible. I have tried both local and normal scripts. It is a SurfaceGui that I am using. The TextButton will not function at all when clicked. Here is the script(currently normal script):

01debounce = false
02function OnClick()
03    if debounce == false then
04    debounce = true
05    script.Parent.Text = "Logging In"
06    script.Parent.Parent.Login.TextLabel.Text = "Welcome to russieTECH Wayfarer"
07    wait(5)
08    script.Parent.Parent.Login.TextLabel.Text = "russieTECH"
09    script.Parent.Text = "Login"
10    script.Parent.Parent.Login.Visible = false
11    script.Parent.Visible = false
12    script.Parent.Parent.Main.Visible = true
13    debounce = false
14    else
15        print "Invalid debounce"
16    end
17 
18end
19 
20script.Parent.MouseButton1Down:connect(OnClick)

Answer this question