Needing help with a gui!

Hello there, I tried making some sort of staff gui for my friends group! But I got confused to the point where only staff members above some sort of rank can have the gui. The number of the rank id is 10. And I want 10 and above rank ids to get the gui! Can anyone help me with this?

local script:

local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local groupID = --put your ID here
local gui = --put GUI instance here
if Player:GetRankInGrouop(groupID) < 10 then
gui:Destroy()
end

Not sure what I did wrong, but it doesn’t work and it returns nothing.

  1. Make sure the local script is in a place where local script runs
  2. Make sure you filled in the things I told you to fill in properly.

also I made typo in it, GetRankInGroup*