So, I have a ranking system and I would like to have players have the ability to change their ranks. Is there any way I can do this? I don’t need spoonfeeding, just some ideas and a base sketch on how I could achieve this. Thank you!
Can you give more context? Change their group rank?
Not that, I mean like ingame custom ranks. Example,
I have 2 ranks
- Noob
- Pro
I want the player to be able to choose which rank they want to equip
Do you want different servers for each rank? Or just a “name tag”?
servers? Its just a billboard gui above their head
This is what I would do:
Put this in a server script somewhere in Replicated Storage.
local plr = game.Players.LocalPlayer
local folder = Instance.new("Folder")
folder.Parent = plr
folder.Name = "Ranks"
local Value = Instance.new("BoolValue")
Value.Parent = Folder
Value.Name = "Noob?"
Now you have the value. How would players choose the value?
-
Create two text buttons in the StarterGui, inside a ScreenGui. Call them Noob and Pro and name the ScreenGui to RankSelection.
-
Copy this script in a local script in the RankSelection
local plr = game.Players.LocalPlayer
local Ranks = plr:WaitForChild("Ranks")
local Rank = Ranks.Noob?
local ScreenGui = script.Parent
local Noob = ScreenGui.Noob
local Pro = ScreenGui.Pro
Noob.MouseButton1Down:Connect(function()
Rank = true
ScreenGui.Enabled = false
end)
Pro.MouseButton1Down:Connect(function()
Rank = false
ScreenGui.Enabled = false
end)
Great. Now we have the selection. Let’s make the Billboard!
Create a new BillboardGui and add a TextLabel into it. Customise and position it where you want.
Now add a local script in the TextLabel. If it doesn’t work, try adding a server script in there (I am quite new to Billboard Guis lol)
Now paste this in there.
local TextLabel = script.Parent
local plr = game.Players.LocalPlayer
local Ranks = plr:WaitForChild("Ranks")
local Rank = Ranks.Noob?
if Rank then
TextLabel.Text = "False"
else
TextLabel.Text = "False"
end
Now you are ready to go! Please tell me if there are any errors or if it worked!
Hope that helped,
Theyoloman1920