How do i give a player an overheadGui based on the leaderstats (ELO)
you just have to clone the BillboardGui and parent it to the player’s head
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local ELO = plr:WaitForChild("leaderstats").elo
local OverHeadGUI = game.ServerStorage.BillboardGUIs:FindFirstChild(ELO.Value)
if not OverHeadGUI then return end
local Clone = OverHeadGUI:Clone()
Clone.Parent = char.Head
end)
end)
you could also add a changed event to check whenever the elo changes and do the changes
If i clone it to the player’s head it won’t automatically give the overheadGui based on the ELO
it depends though does your ELO go up/down by 100 each time or what and where ru keeping all of your BillboardGUIs
Depending on you ELO.
Don’t count MVP, pretend it doesnt exist
For now i put them inside of a part to showcase them
An easy way to get/set player information across the server is to create a folder when the player joins the game with Value Objects held inside of it.
Once you load/create their info, also update the values held inside the folder.
Then, whenever the client needs to fetch something like another player’s kill score (or in this case ELO), it can just ask the server for its value.
If you use what the above user said, and maybe add an event for updating the Text in the gui connected to when the associated score value is loaded/changes, it should automatically update their overhead gui.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.