local Lock1 = script.Parent.Frame.locks["Lock(MP)"]
local Locks = script.Parent.Frame.locks
local LockDev = script.Parent.Frame.locks.LockDev
local LockMarsh = script.Parent.Frame.locks.LockMarshel
local LockOfficer = script.Parent.Frame.locks.LockOfficer
if game.Players.LocalPlayer:GetRankInGroup(4937707)== "1" then
Lock1:Destroy()
print("Member is here")
end
if game.Players.LocalPlayer:GetRankInGroup(4937707) == "255" then
Locks:Destroy()
print("Owner/Marshel Is in")
end
if game.Players.LocalPlayer:GetRankInGroup(4937707) == "254" then
Locks:Destroy()
print("Marshel Is in")
end
if game.Players.LocalPlayer:GetRankInGroup(4937707) == "150" then
Lock1:Destroy()
LockDev:Destroy()
print("Dev is here")
end
if game.Players.LocalPlayer:GetRankInGroup(4937707) == "54" then
LockOfficer:Destroy()
Lock1:Destroy()
print("Officer is here")
end
if game.Players.LocalPlayer:GetRankInGroup(4937707) == "53" then
LockOfficer:Destroy()
Lock1:Destroy()
print("Officer is here")
end
if game.Players.LocalPlayer:GetRankInGroup(4937707) == "52" then
LockOfficer:Destroy()
Lock1:Destroy()
print("Officer is here")
end
if game.Players.LocalPlayer:GetRankInGroup(4937707) == "51" then
LockOfficer:Destroy()
Lock1:Destroy()
print("Officer is here")
end
if game.Players.LocalPlayer:GetRankInGroup(4937707) == "50" then
LockOfficer:Destroy()
Lock1:Destroy()
print("Officer is here")
end
as you can see here, locks suppose to cover the team changer buttons. I have developer role, the locks of developer won't destroy, also it doesn't print anything, any help???

8 comments
:GetRankInGroup returns a number, a number, not a string representation of a number. Also instead of a bunch of messy control structures use dictionaries. An answer is coming right up
Alright thank you.. I'll be waiting!
That thing only comes up once and thats it, try use "game.Players.Playadded" and then after that see if the player is in the group and if they are then make a variable saying local rank = player:GetRankInGroup(4937707) if rank == (whatever) then do whatever do this all in a server script
WillBe_Stoped:
Tried this : game.Players.PlayerAdded:Connect(function(player) local Rank = player:GetRoleInGroup(4937707) if Rank == (150) then print("test") end end)
waits..
This script is badly optimized in my opinion but in theory it should work. Make sure the developer rank is the same as the rank number in the Group Admin
It is alright. I just putted the numbers in "1", suppose to be 1 not "1"