Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

OverHeadGui Group rank checker and rank name?

Asked by 5 years ago

Ok so I made an Overhead gui script and I want it to check if a person is in a group and if he is not kick him and if he is check his rank and make it the text.

01game.Players.PlayerAdded:connect(onPlayerRespawned)
02function onPlayerRespawned(newPlayer)
03    wait(1)
04    if newPlayer.Name == "YourNameHere" then
05        gui=Instance.new("BillboardGui")
06        gui.Parent=newPlayer.Character.Head
07        gui.Adornee=newPlayer.Character.Head
08        gui.MaxDistance = 100
09        gui.Size=UDim2.new(3,0,3,0)
10        gui.StudsOffset=Vector3.new(0.5,2,0)
11        text=Instance.new("TextLabel")
12        text.Text = ("GAME CREATOR")
13        text.Font = "SciFi"
14        text.TextColor3 = Color3.new(234, 252, 0)
15        text.Size=UDim2.new(1,0,1,0)
View all 31 lines...

That's the script I would appriciate if u help, thanks for reading.

1 answer

Log in to vote
0
Answered by
qChaos 86
5 years ago
Edited 5 years ago
01local GroupID=1234567 --Put Group ID here
02game:GetService'Players'.PlayerAdded:Connect(function(Player)
03    local Check
04    local AlreadyChecked
05    local Rank
06    Player.CharacterAdded:Connect(function(Character)
07        if not AlreadyChecked then
08            if Player:IsInGroup(GroupID) then
09                Rank=Player:GetRoleInGroup(GroupID)
10                AlreadyChecked=true
11                Check=true
12            else
13                AlreadyChecked=true
14            end
15        end
View all 35 lines...

Fixed it for you, just change the group id to your group and it should work, let me know if you have any questions :)

Ad

Answer this question