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

My gui script is not making a different gui visible?

Asked by
tek_o 56
5 years ago

Really don't know what ROBLOX is doing these "updates" for, but now my script doesn't work

script.Parent.MouseButton1Click:Connect(function()
    game.StarterGui.Frame.TextBox.Visible = true
end)

It doesn't show up, and I honestly have no idea why.

1
use PlayerGui instead of StarterGui mixgingengerina10 223 — 5y
0
Thanks! tek_o 56 — 5y
0
Np. Make sure to write [SOLVED] Beside the question's name. mixgingengerina10 223 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Roblox updates haven't really affected the way we have to script as of yet.

Here are a few Issues:

  1. First, your Frame and TextBox isn't inside a ScreenGui which makes it invisible.
  2. Second, your editing the StarterGui which is what is cloned into every player's Gui which won't update.

So how can you fix this?

  1. By putting Frame and TextBox into a ScreenGui

  2. Instead of getting StarterGui, get player Gui

Now what you are doing is MouseButton1Click which SHOULD be handled by the client. With this information what you could do is:

local plr = game.Players.LocalPlayer

script.Parent.MouseButton1Down:Connect(function()
    plr.PlayerGui.YourScreenGuiName.Frame.TextBox.Visible = true
end)

Hopefully, this gave you an idea of what to do.

Best of luck developer.

Ad

Answer this question