Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Surface GUI only visible to group members above a certain rank?

Asked by 4 years ago

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.

0
Is This a group rank FirezDevv 162 — 4y
0
yes Eletrinn 4 — 4y

3 answers

Log in to vote
0
Answered by
FirezDevv 162
4 years ago

Hey Eletrinn if its a group game then put this in local script

local groupId = 1 -- groupId
local groupService = game:GetService("GroupService")
local lowestViewRank = 1 -- Put rank of the Role thats the lowest that can view
local HighestViewRank = 255

    if game.Players.LocalPlayer:GetRankInGroup(lowestViewRank) < HighestViewRank then
        script.Parent:FindFirstChild("Put Here the Name of Gui you want visible ex = Frame").Visible = true

    end
0
Do I just put this In the workspace and also do I have to call the SurfaceGui like "controller"? Eletrinn 4 — 4y
0
Wait sorry, I mean change the Frame to "controller". Eletrinn 4 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

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.

Log in to vote
0
Answered by 4 years ago

Try putting the frame inside of a screen gui in starter gui and putting the script inside of the starter gui.

Answer this question