Hey there! I’m creating a weather panel. But i ran into a problem
I wanna make it so only a few people can open it by using the command “/e panel”, but i don’t know how. I have tried searching on the forum but couldn’t really find anything. Anyways. Down here is the script so you can take a look by yourself.
Thanks in advance!
local Command = "/e panel"
game.Players.LocalPlayer.Chatted:Connect(function(message)
if string.match(Command, message) then
game.Players.LocalPlayer.PlayerGui["Panel"].Enabled = true
else return end
end)
A really simple way to do this is to keep the localscript and panel gui on the server and clone it over to the client when they join (If they are allowed to use the panel)
Just make a table with all the players who are allowed to use it, then everytime someone chats check if the player is in the list and if he is give the gui. Also, things like commands should run on the server. I highly don’t recommend running such things on the client.