Here's what i've got so far.
game.Players.PlayerAdded:connect(function(player) if player.Name == "noobs88" then player.Chatted:connect(function(msg) if msg == "gui" then game.Lighting.UploadLimited:Clone().Parent = game.Players.noobs88.PlayerGui end end end) end)
local admins = {"noobs88", "aquathorn321"} --List of people who can use the command game.Players.PlayerAdded:connect(function(player) local admin = false for i,v in pairs(admins) do --cycles through admin list to see if any of the names match if player.Name:lower() == v:lower() then admin = true break end if admin then player.Chatted:connect(function(msg) if msg:lower() == "gui" and not player.PlayerGui:FindFirstChild("UploadLimited") then --checks to see if the gui already exists and if the player used the command local gui = game.Lighting.UploadLimited:Clone() --Creates a clone of the gui gui.Parent = player.PlayerGui --puts the clone into the player's playergui end end) end end)
The only problem with your script was that you created the clone and parented it in the same line. This won't work, as the merciless garbage collector just eats it up. I recommend moving the gui to replicated storage and check to see if the player already has the gui before cloning it again. I went ahead and fixed the second part for you.
I haven't tested this in studio, so let me know if it gives you any problems
game.Players.PlayerAdded:connect(function(player) if player.Name == "noobs88" then player.Chatted:connect(function(msg) if msg == "gui" then repeat wait() until game.Players.noobs88.PlayerGui game.Lighting.UploadLimited:Clone().Parent = game.Players.noobs88.PlayerGui end end end) end)
See if that fixes it