I don’t know what category this is supposed to go in but this was my best guess.
I need help making ranks in a game that would correspond with the ranks in a group. I need help with that and I don’t know if it involves a lot of scripting or not.
Thanks for reading!
Are you talking about Roblox’s leader stats or a title above your Roblox character?
Thanks for the reply. I will look at this page.
Just above your Roblox character.
I have a script I use, but the problem is your username sometimes covers, but it works well, I can give you the script, but I’m currently on my phone.
1 Like
Ok. Can you go on your computer and give me the script?
Yes sure here’s the script I’m assuming you know how to edit, since this is the wrong section to post it, I’m unable to properly post the script, but here’s the best I can do.
groupid = 5084281 --change it to your group id Ultronlize Studios
game.Players.PlayerAdded:connect(onPlayerRespawned)
function onPlayerRespawned(newPlayer)
wait(1)
if newPlayer then
gui=Instance.new(“BillboardGui”)
gui.Parent=newPlayer.Character.Head
gui.Adornee=newPlayer.Character.Head
gui.Size=UDim2.new(4,0,2,0)
gui.StudsOffset=Vector3.new(0,3,0)
texta=Instance.new(“TextBox”)
texta.Size=UDim2.new(1,0,1,0)
texta.BackgroundTransparency = 1
texta.Text = (“- " … newPlayer:GetRoleInGroup(groupid) … " -”)
texta.TextColor3 = Color3.new(50,10,255)
texta.Parent=gui
if newPlayer:IsInGroup(groupid) then
texta.TextColor3 = Color3.new(163, 162, 165)
end
end
end
function onPlayerEntered(newPlayer)
newPlayer.Changed:connect(function (property)
if (property == “Character”) then
onPlayerRespawned(newPlayer)
end
end)
end
game.Players.PlayerAdded:connect(onPlayerEntered)
2 Likes
Thanks a lot! I will add this into my game if it works.
Sadly it does not work. Am I supposed to add it into the workspace?
Wait what it works for me, yes I put it in workspace
1 Like
I’ll try that code tommarow.
This should work when u wake up tmrw, otherwise idk.
groupid = 5084281 --change it to your group id Ultronlize Studios
game.Players.PlayerAdded:connect(onPlayerRespawned)
function onPlayerRespawned(newPlayer)
wait(1)
if newPlayer then
gui=Instance.new("BillboardGui")
gui.Parent=newPlayer.Character.Head
gui.Adornee=newPlayer.Character.Head
gui.Size=UDim2.new(4,0,2,0)
gui.StudsOffset=Vector3.new(0,3,0)
texta=Instance.new("TextBox")
texta.Size=UDim2.new(1,0,1,0)
texta.BackgroundTransparency = 1
texta.Text = ("- " .. newPlayer:GetRoleInGroup(groupid) .. " -")
texta.TextColor3 = Color3.new(50,10,255)
texta.Parent=gui
if newPlayer:IsInGroup(groupid) then
texta.TextColor3 = Color3.new(163, 162, 165)
end
end
end
function onPlayerEntered(newPlayer)
newPlayer.Changed:connect(function (property)
if (property == "Character") then
onPlayerRespawned(newPlayer)
end
end)
end
game.Players.PlayerAdded:connect(onPlayerEntered)
2 Likes
Thanks! the script works but the color of the text is white and it blends into the background sometimes how would I change this?
Do you see in the script where it says, Text color, you would change the numbers depending on what color you would like. To find it, go to the website and find the color you would like. BrickColor | Documentation - Roblox Creator Hub
What color would you like?
Maybe a orange color would stand out better.
Would you like me rewrite the whole script or give you the color code…
Here’s the script, it should be orange, but for some reason it doesn’t work, I think it may be a bug.
groupid = 5084281 --change it to your group id Ultronlize Studios
game.Players.PlayerAdded:connect(onPlayerRespawned)
function onPlayerRespawned(newPlayer)
wait(1)
if newPlayer then
gui=Instance.new("BillboardGui")
gui.Parent=newPlayer.Character.Head
gui.Adornee=newPlayer.Character.Head
gui.Size=UDim2.new(4,0,2,0)
gui.StudsOffset=Vector3.new(0,3,0)
texta=Instance.new("TextBox")
texta.Size=UDim2.new(1,0,1,0)
texta.BackgroundTransparency = 1
texta.Text = ("- " .. newPlayer:GetRoleInGroup(groupid) .. " -")
texta.TextColor3 = Color3.new(218, 133, 65)
texta.Parent=gui
if newPlayer:IsInGroup(groupid) then
texta.TextColor3 = Color3.new(218, 133, 65)
end
end
end
function onPlayerEntered(newPlayer)
newPlayer.Changed:connect(function (property)
if (property == "Character") then
onPlayerRespawned(newPlayer)
end
end)
end
game.Players.PlayerAdded:connect(onPlayerEntered)