How would you set visibility property of textbutton from server? [Roblox]

Viewed 38

I'll make this really simple. I'm making an admin commands system and I'm trying to turn on a TextButton inside of the player (plr.PlayerGui.adminUi) when they chat ":cmdb". I've debbuged with print statements and all works. I added a print statement to tell me the status of "commandbar.Visibility" and it says that it's true, even though you can't see it and the checkbox in properties is false.

This is what I've had so far, with no error messages. This works the first time, but never works again. (this is in a module script)

commands.cmdb = {0, function(plr, rsp)
    game.Players[plr.Name].PlayerGui.adminUi.commandbar.Visible = true
end}

This is the explorer:
explorer image

and this is the code for "Exit":

script.Parent.MouseButton1Up:Connect(function()
    script.Parent.Parent.Visible = false
end)

Any help is appreciated, and if I missed anything neccessary, please let me know!

1 Answers
Related