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

How do I have a team based overhead rank GUI?

Asked by 4 years ago
Edited 4 years ago

Basically, there is an overhead rank gui, it works fine and all on the player added event however I am unsure how I change it after with a different group.

local Player = game.Players.LocalPlayer

Player.CharacterAdded:Connect(function(Character)
    if Player.Team == "Police" then
        local pdId = grouprankhere
        local pdname = script.NameGUI:Clone()
        pdname.Parent = Character.Head
        local pdrank = script.RankGUI:Clone()
        pdrank.Parent = Character.Head

        local namelabel = pdname.TextLabel
        local ranklabel = pdrank.TextLabel

        local PlayerRank = Player:GetRoleInGroup(pdId)
        namelabel.Text = Player.Name
        ranklabel.Text = PlayerRank
    end
end)
0
Just so you know, the player can only join the team if they are in the group. RaptorScript 0 — 4y
0
btw your pdId variable should be the ID of your Group and I think it should be all good DeUltimate23 142 — 4y
0
I know It is meant to be that, I changed it for privacy issues on here RaptorScript 0 — 4y
0
I get an error however saying that its index nil with character.added RaptorScript 0 — 4y
View all comments (2 more)
0
LocalPlayer pointers are only available to the Client, as the Client has an affiliated Player Object. The Server is far from a Client. Ziffixture 6913 — 4y
0
Oh, so how would I approach this? RaptorScript 0 — 4y

Answer this question