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

SurfaceGUI not becoming visible?

Asked by 8 years ago

This is a script designed so that when the player clicks this button it will make the frame not visible and make the frame inside the same SurfaceGui visible. However this script doesn't do anything. Can anyone help me? This is a LocalScript inside of a TextButton.

script.Parent.MouseButton1Click:connect(function()
    script.Parent.Parent.Visible = false
    script.Parent.Parent.Parent.Booking.Visible = true
end)

1 answer

Log in to vote
0
Answered by
brianush1 235 Moderation Voter
8 years ago

The problem is that the script is a local script. Try using a server-sided script instead. Local scripts can only work if they are in a player's PlayerGui or Backpack, which a SurfaceGUI would not be, unless it should only be visible to one player.

Ad

Answer this question