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

surface gui button not clicking on first try ?

Asked by 9 years ago

i seriously have to work to click that button !

script.Parent.MouseButton1Up:connect(function()
    script.Parent.Parent.Parent.Parent.Part1.SurfaceGui.TextBox.Text = script.Parent.Text
    script.Parent.Parent.Parent.BrickColor = BrickColor.new("Bright green")
    if script.Parent.Text == "Good" then
        script.Parent.Parent.Parent.Parent.Number.Value = script.Parent.Parent.Parent.Parent.Number.Value + 1
    elseif script.Parent.Text == "Bad" then
        script.Parent.Parent.Parent.Parent.Number.Value = script.Parent.Parent.Parent.Parent.Number.Value - 1
    end
end)
0
Is this a ClickDetector? woodengop 1134 — 9y
0
its a textbutton inside a surface gui Layfonex 0 — 9y
0
Is there anything in the output? woodengop 1134 — 9y
0
nope just its very hard to click but it does click Layfonex 0 — 9y
View all comments (7 more)
0
So it works fine? woodengop 1134 — 9y
0
em not really its not suppose be hard to click Layfonex 0 — 9y
0
Maybe it's your mouse. woodengop 1134 — 9y
0
no lol guis work fine but surface gui doesnt want to click Layfonex 0 — 9y
0
Are you sure it's not MouseButton1Down? woodengop 1134 — 9y
0
ill try it Layfonex 0 — 9y
1
MouseButton1Up will only execute when you release a left click, try MouseButton1Down or MouseButton1Click FutureWebsiteOwner 270 — 9y

1 answer

Log in to vote
-1
Answered by 9 years ago

I'm not sure but if you change the event it might solve your problem. However I'm not 100% sure it will help you out with the "Clicking" difficulties.

script.Parent.MouseButton1Click:connect(function()-- I change it to MouseButton1Click which might help.
    script.Parent.Parent.Parent.Parent.Part1.SurfaceGui.TextBox.Text = script.Parent.Text
    script.Parent.Parent.Parent.BrickColor = BrickColor.new("Bright green")
    if script.Parent.Text == "Good" then
        script.Parent.Parent.Parent.Parent.Number.Value = script.Parent.Parent.Parent.Parent.Number.Value + 1
    elseif script.Parent.Text == "Bad" then
        script.Parent.Parent.Parent.Parent.Number.Value = script.Parent.Parent.Parent.Parent.Number.Value - 1
    end
end)
0
basically what i just said in a comment :/ FutureWebsiteOwner 270 — 9y
Ad

Answer this question