Hello, I am trying to make a command that makes a Menu GUI pop up, I made the script but I am not sure why it's not working, any help would be greatly appreciated.
local GroupID = 7000168 local MinimumRank = 5 local Menu = game.StarterGui.ScreenGui.Menu game.Players.PlayerAdded:Connect(function(Player) Player.Chatted:Connect(function(Message) if Player:GetRankInGroup(GroupID) >= MinimumRank then if Message == "!Menu" then Menu.Visible = true end end end) end)
You need to get the GUI from the Player's PlayerGui instead of the StarterGui. When a player joins the game everything inside of StarterGui will replicate to the player's PlayerGui. So you need to get the GUI from the player's PlayerGui and make changes to it from there so the player can actually see it.
local GroupID = 7000168 local MinimumRank = 5 game.Players.PlayerAdded:Connect(function(Player) local PlayerGui = Player.PlayerGui Player.Chatted:Connect(function(Message) if Player:GetRankInGroup(GroupID) >= MinimumRank then if Message == "!Menu" then local ScreenGui = PlayerGui:WaitForChild("ScreenGui") local Menu = ScreenGui:WaitForChild("Menu") Menu.Visible = true end end end) end)
Maybe you can change the location of the menu gui to:
local Menu = game.Players.LocalPlayer.PlayerGui.ScreenGui.Menu