Opening a gui with a comman

what would be the easiest and most optimized way to open a screengui onto a users screen if they meet certain requirements like a group rank? I have a system that checks the SecCheck in a ServerScript and a Local Script, would a remote event be the best way?

Directly clone the gui into the PlayerGui from the server. Don’t keep the gui locally in such situations where the gui shouldn’t be normally accessed as exploiters can gain access.

For the same reason, make sure to monitor every action the client does on the gui that involves the server.

but how would I use the command to clone it? would the server just be like, ok this player passed the seccheck, GUI:Clone() to players playergui

Send the command over to the server and evaluate it. If it is a legitimate command and the player is authorized to run that command, clone the gui into the player’s PlayerGui on the server.

gotcha, so don’t use the client to open the gui, i’ve never done a command to open a gui how exactly would that look is there any resource you know of? does it include like PlayerChatted?

PlayerChatted can be directly used on the server so there is no need for the client to send the server the command.

gotcha, I appreciate it I’ll let you know how it goes thanks!

1 Like

okay, it did work, basically all I did was an if statement so if SecCheck(Player) then gui.enabled = true basically. thanks for the help!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.