I want a Rank Handler, where your name and rank display above your head according to a Roblox group, but I want a certain user to have a different rank than his group rank.
Basically I think I have a script but it is not working, there are no errors in the script but it just displays the normal group rank, not the name that I want.
If anyone could help me with what’s the issue or maybe fix the script for me it’d be greatly appreciated. Thanks.
local groupID = 8008122
local player = game.Players.LocalPlayer
local id = 356235180
game.Players.PlayerAdded:Connect(function(player)
local groupRank = player:GetRoleInGroup(groupID)
local clone = script.Rank:Clone()
clone.Parent = game.Workspace:WaitForChild(player.Name).Head
clone.Frame.Name1.Text = player.Name or if player.UserId == 356235180 then
clone.Frame.Rank.Text else "Owner"
clone.Frame.Rank.Text = groupRank
player.CharacterAdded:Connect(function()
local groupRank = player:GetRoleInGroup(groupID)
local clone = script.Rank:Clone()
clone.Parent = game.Workspace:WaitForChild(player.Name).Head
clone.Frame.Name1.Text = player.Name
clone.Frame.Rank.Text = groupRank
end)
end)
Ok two things what the hell is these part?
clone.Frame.Name1.Text = player.Name or if player.UserId == 356235180 then
clone.Frame.Rank.Text else “Owner”
these doesnt make scence in scripting Explain what were you tying there
and why are you cloning script.Rank two time?
local groupID = 8008122
game.Players.PlayerAdded:Connect(function(player)
local groupRank = player:GetRoleInGroup(groupID)
local clone = script.Rank:Clone()
if player.Character then
clone.Parent = player.Character.Head
-- Assuming I have read it all correctly, this will give the owner of the group the "Owner" title instead of his rank title
if player.UserId == 356235180 then
clone.Frame.Rank.Text = "Owner"
else
clone.Frame.Rank.Text = groupRank
end
clone.Frame.Name1.Text = player.Name
end
end)
local groupID = 8008122
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
local groupRank = player:GetRoleInGroup(groupID)
local clone = script.Rank:Clone()
if player.Character then
clone.Parent = player.Character.Head
-- Assuming I have read it all correctly, this will give the owner of the group the "Owner" title instead of his rank title
if player.UserId == 356235180 then
clone.Frame.Rank.Text = "Owner"
else
clone.Frame.Rank.Text = groupRank
end
clone.Frame.Name1.Text = player.Name
end
end)
end)