I am struggling with a issue at the moment. I have a GUI on a part and I am trying to make it so only the frame that allows you to control it is visible to people above a certain rank. It is supposed to change from the "Disabled" gui to "ShutterController" gui but it isn't working. May somebody be able to help me solve this issue I am having. The code is below. Just so you know the lowestViewRank will be set higher and I am in the group and above that rank number but the GUI is not changing.
local groupId = 5002973
local groupService = game:GetService("GroupService")
local lowestViewRank = 1
local HighestViewRank = 255
if game.Players.LocalPlayer:GetRankInGroup(lowestViewRank) < HighestViewRank then
script.Parent:FindFirstChild("Disabled").Visible = false
script.Parent:FindFirstChild("ShutterController").Visible = true
end

4 comments
Just to let you know the LOCAL SCRIPT is the the surface GUI of the part.
is it in serverscriptservice?
I have put it in there now and re linked the script.Parents but it still doesn't to have appeared to of worked.
The reason for the error maybe that you didnt reference the player who joined the game.