I want to make a local script inside starter gui that if you are in the group you will get the button e.g.
if Player:IsInGroup(groupId) then
GUI.Frame.Employee.Visible = true
end
lol but IDK if that is right
I want to make a local script inside starter gui that if you are in the group you will get the button e.g.
if Player:IsInGroup(groupId) then
GUI.Frame.Employee.Visible = true
end
lol but IDK if that is right
That’s correct
If you are in the group it will make the button visible
I suggest you read up on this more
Exploiters can change the Visible
property on their client, giving them complete access to GUI they have no right in being in.
Instead, I suggest you use this instead
game.Players.PlayerAdded:Connect(function(Player)
if Player:IsInGroup(ID) then
local UIClone = game.ServerStorage.AdminGui:Clone()
UIClone.Parent = Player.PlayerGui
UIClone.ResetOnSpawn = false
end
end)
Use a ServerScript
and have it check for who joins the server, check if they’re in the server, and clone a UI from ServerStorage
or anywhere else the player cannot see (exploiters cannot see ServerScriptService
and ServerStorage
primarily), its important that the client cant see the source Gui so any exploiter cant just copy it over to their playergui and use it to their hearts content
The only downside to having this Severside is that the information is not live (if they leave the group while being in the game, the game will think they’re still in the group until they leave), but i doubt thats of much concern in this usecase
Thanks but I can just check if the player clicked the button and if the player is not in group and they touch it it will become not visible its a easy script
I just need to put a while true do
script maybe and it will updated every 3 seconds maybe
This is a very bad practice, if you want to give the client ui, it must be on the server, its honestly a waist of resources having several checks for a UI script when you could easily just not give guest clients the gui at all
It doesnt update for severs until they leave the game.