I have a local script, inside a text button, inside a surfacegui, inside a part, inside of workspace.
My local script
script.Parent.Activated:Connect(function(plr)
print("ok")
plr.PlayerGui.ScreenGui.Laptop.Visible = true
end)
Thanks!
I have a local script, inside a text button, inside a surfacegui, inside a part, inside of workspace.
My local script
script.Parent.Activated:Connect(function(plr)
print("ok")
plr.PlayerGui.ScreenGui.Laptop.Visible = true
end)
Thanks!
Since you are trying to detect when the text button is being click, you would use .MouseButton1Click
script.Parent.MouseButton1Click:Connect(function(plr)
print("ok")
plr.PlayerGui.ScreenGui.Laptop.Visible = true
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
That didn't work
Try and put that inside of a normal script, it worked for me that way, unless you need it to be a local script for some reason
I am making a gui be visible, doesn't that need to be a local script
otherwise all players in the game will have their gui visible