The title says it but to put it in to more detail I am making a SurfaceGui on this brick and I do not know how to make it so only people above a certain rank can press it in a roblox group.
Hey Eletrinn if its a group game then put this in local script
1 | local groupId = 1 -- groupId |
2 | local groupService = game:GetService( "GroupService" ) |
3 | local lowestViewRank = 1 -- Put rank of the Role thats the lowest that can view |
4 | local HighestViewRank = 255 |
5 |
6 | if game.Players.LocalPlayer:GetRankInGroup(lowestViewRank) < HighestViewRank then |
7 | script.Parent:FindFirstChild( "Put Here the Name of Gui you want visible ex = Frame" ).Visible = true |
8 |
9 | end |
This does not seem to be working. I have put the Local Script in Workspace and linked the Frame that I am trying to make invisible. I have set the group id and lowest and highest View rank but it does not to have seemed to have of worked.
Try putting the frame inside of a screen gui in starter gui and putting the script inside of the starter gui.