I have a SurfaceGui with a TextButton inside it. I am stuck at a point where the button is clicked and a gui comes up for the player to interact with. I don't really have any supplementary scripts since I am very stuck on this topic. I've looked at the WIKI and the Forums and they say that it is not possible to see who clicked a SurfaceGui button unless it is in the StarterGui. Sorry again for not having much code to put in here. I don't want this to seem like a request, but I have really hit a wall. Here it is:
function onClicked() -- Need to locate playerGui -- PlayerGui.Screen.Frame.Visible = true end script.Parent.ClickDetector.MouseClick:connect(onClicked)
I'm trying to make the ScreenGui visible when a SurfaceGui Button is clicked.
if it's a local script,
local player = game.Players.LocalPlayer function onClicked() player.PlayerGui-- Need to locate playerGui player.PlayerGui.Screen.Frame.Visible = true end script.Parent.ClickDetector.MouseClick:connect(onClicked)
if normal script,
game.Players.PlayerAdded:connect(function(player) function onClicked() player.PlayerGui-- Need to locate playerGui player.PlayerGui.Screen.Frame.Visible = true end script.Parent.ClickDetector.MouseClick:connect(onClicked)
but if the wiki and forum says it's not possible, then it might not be. but good luck using these.