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

how do i make my auto team morph script detect the rank of the person in a group?

Asked by 2 years ago

could someone help me I made an auto morph team but I wanted it to detect the rank of the person within the group and make the player get another different morph

my script is like this

            if Player.TeamColor == BrickColor.new("Black") then 
            Body(1,1,1,Character)
            MorphUser(Player,"Rank","Test","Cru Member","Morph")
            Finale(Character)
            Finale0(Character)
            end

1 answer

Log in to vote
0
Answered by 2 years ago

I'm gonna give you an idea on how to use :GetRankInGroup(), I'm not gonna write the entire script.

-- // Server \\ --

local Players = game:GetService("Players")
local GroupID = 2 -- // Your Group ID, it can be found in the URL bar

Players.PlayerAdded:Connect(function(plr)
    local function getRank ()
        return plr:GetRankInGroup(GroupID)
    end

    local Rank = getRank()

    if Rank == 255 then
        print("Player is the owner")
    else
        print("Player is not the owner")
    end
end)

Note that it returns the integer NUMBER of the rank, not in strings

Source:

DevHub: Player:GetRankInGroup

0
thanks bro I managed to do it but now I have a problem with the parts that are floating. NineTailedFox_BR 13 — 2y
Ad

Answer this question