I have been working on a game, and I have opened GUIs with normal scripts before. But, when I try to open a GUI with a LocalScript, it doesn't work. I am trying to find a way to make this work, but I can't. Any help?
I knew that you can't open a GUI with a LocalScript
, but I tried to do it in several ways anyway; and actually, it can't be done. But you can do it with a Script
, and it will only affect the player and won't affect others (only the GUI will appear for the one who pressed ClickDetector
). This is the best way to do it:
script.Parent.MouseClick:Connect(function(player) player:WaitForChild("PlayerGui").ScreenGui.Frame.Visible = true --Reminder: Change the names and locations to the ones you need end)
It's a very simple stuff. Let me know if this answer helped you :D