Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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.

2 comments

0

Is This a group rank

0

yes

3 answers

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

2 comments

0

Do I just put this In the workspace and also do I have to call the SurfaceGui like "controller"?

0

Wait sorry, I mean change the Frame to "controller".

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.