So I am not that good as a scripter and this did not work. I just want it so if the groupid = 2864146 then it checks what rank you are and if you are a Waiter Rank, the GUI is not transparent, but if the rank is not a waiter, the gui is transparent. Please help. Thank you.
Groupid = 2864146 Min = 4 Max = 255 if Groupid rank = Waiter then script = true else = script.Parent = false end if game.Players.LocalPlayer.Name ~= "" and game.Players.LocalPlayer:GetRankInGroup(Workspace.GiveSystem.GroupID.Value) < Workspace.GiveSystem.RankID.Value then return end
You seem unsure of the basics of scripting so I recommend you start with practicing changing the color of a brick, or changing the position of a brick before you start getting into scripting guis.
local groupId= 2864146 local plr = game.Players.LocalPlayer local guiPath = plr.PlayerGui.ScreenGui.DesiredGui --edit this path to be the gui you want to change guiPath.Visible = (plr:GetRoleInGroup(groupId) == "Waiter") --alternative based on the rank number instead of the role name local waiterRank= 4 guiPath.Visible = (plr:GetRankInGroup(groupId) == waiterRank)
The rank number method is recommended to remove dependency on the exact role name. For example, if the role in the group is "waiter" and you compare it to "Waiter" it will return false and the gui wont show up.
This is an alternative for the last line that has the exact same effect, but is easier to understand.
local role = plr:GetRoleInGroup(groupId) if role == "Waiter" then --make sure that the name matches exactly including case. guiPath.Visible = true else guiPath.Visible = false end --and for the rank method local waiterRank = 4 local rank = plr:GetRankInGroup(groupId) if rank == waiterRank then guiPath.Visible = true else guiPath.Visible = false end