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

GUI Button not working, someone help me fix?

Asked by 10 years ago

this script isn't doing anything. No errors and nothing in the output.

strength = script.Parent.TextBox
script.Parent.MouseButton1Down:connect(function() 
    strength.Text = math.random(1,10)
end)

stumped on this...

1 answer

Log in to vote
0
Answered by 10 years ago

Try this one

local Gui = script.Parent

function onClicked()
if script.Parent.Frame.Visible == false then
script.Parent.Frame.Visible = true
script.Parent.Frame.TextLabel.Visible = true
else
script.Parent.Frame.Visible = false
script.Parent.Frame.TextLabel.Visible = false
end
end

Gui.MouseButton1Click:connect(onClicked)
Ad

Answer this question