I’m starting to think that this script i’ve been trying to make is not possible to make.
So, like there is already group rank leaderstats but i’m trying to create something beyond that. I want it that if your in (group ID) then your leaderstats name is “Eligible” and if your not your name is “Ineligible” but I keep trying to play around with the group rank script, and I can’t do it.
(summary) I don’t want it showing your ROLE name. I just want it that if your in the group your name on the leaderstats is “Eligible” and if not your name is “Ineligible”
just check if he’s in a group if so set the value to “Eligible” if not set it to “Ineligible”
game.Players.PlayerAdded:Connect(function(player)
if player:IsInGroup(0) then
player.leaderstats.value = "Eligible" -- Make this a path to the leaderstat value
else
player.leaderstats.value = "Ineligible" -- Make this a path to the leaderstat value
end
end)
The only difference is that your leaderstats Object won’t be visible to the other Players, unless if you meant a Value Object inside the leaderstats
Other then that as @AccessQ stated, use the Player:IsInGroup() function as this will return back a Bool (true/false)
local GroupID = 0 --Obviously replace this with your ID
local function PlayerAdded(Plr)
local leaderstats = Instance.new("Folder")
leaderstats.Parent = Plr
if Plr:IsInGroup(GroupID) then
leaderstats.Name = "Eligible"
else
leaderstats.Name = "Ineligible"
end
end
game.Players.PlayerAdded:Connect(PlayerAdded)