For some reason, I can't find out a way to make a working line of code to just make the Visible property of a TextButton Gui to be false, from a non-Local script in workspace. I tried doing something like this:
local sgui = game:GetService("StarterGui")
sgui.ScreenGui.Button1.Visible = false
But that didn't work. Then, I thought I had to call the PlayerGui instead. Since this will activate when the player touches a brick, I tried something like:
local you = game.Players:FindFirstChild(hit.Parent.Name)
local btn = you.PlayerGui.ScreenGui.MSonicFormsBtn
if not btn.Visible == true then btn.Visible = true end
But that also didn't work. I feel like, since it's just changing a property of something that's simply located in StarterGui, it's something easy that I'm forgetting. But I can't figure it out for the life of me.

1 comment
PlayerGui not screen gui