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

Gui button not working?

Asked by 9 years ago

So this is in a TextButton. I want it so when it is clicked, a textbox becomes visible (currently non-visible)

function ButtonClicked()
if (ButtonClicked) then
game.StarterGui.EscapeMain.EscapeFrame.KeyBox.Visible = true
end
end
script.Parent.MouseButton1Click:connect(ButtonClicked)

It's in a server-side script right now, and I also tried local, but it's not functioning. Thanks ahead of time.

-SmokeyIsSmoking

1 answer

Log in to vote
0
Answered by 9 years ago

Fairly simple... Put you Gui in StarterGui (if you have not already) > Put this code into a NOT LOCAL

script.Parent.NAMEOFWHATISHOULDCLICK.MouseButton1Click:connect(function(Plr) -- What should I be clicking?
game.Players[Plr.Name].PlayerGui.EscapeMain.EscapeFrame.KeyBox.Visible=true
end)
0
You marked me down.....? SmokeyIsSmoking 0 — 9y
Ad

Answer this question