So I have recently wanted to create a billboard GUI that is shown to the whole server above a players head, and it would show the players name, their rank, and their in-game performance. The first two were ok, but how can I make the last one show the whole server the player’s performance above their head because at the moment I was only able to get the billboard GUI show only that players performance, and not anyone else’s in the server,
Here are a few screenshots.
here is a test in a server, the problem I have is I can only see one player’s performance in-game, and that is my own, I cannot see other players performance.
here are the scripts, the goal of the scripts are to fire the server whenever the player’s performance changes and update that for the whole server by changing their GUI on the server-side for everyone to see their performance
-- local script to the server to get player ping and performance in general
local player = game.Players.LocalPlayer
local RunService = game:GetService("RunService")
local Last = tick()
local FPS = 0
local preformancetext = script.Parent
local Function = game.ReplicatedStorage:WaitForChild('PingFunctionLocal')
local RS = game:GetService("ReplicatedStorage")
local low = RS:WaitForChild("PreformanceEvents"):WaitForChild("Low")
local med = RS:WaitForChild("PreformanceEvents"):WaitForChild("Med")
local high = RS:WaitForChild("PreformanceEvents"):WaitForChild("High")
local extreme = RS:WaitForChild("PreformanceEvents"):WaitForChild("Extreme")
function GetPing()
local Start = tick()
Function:InvokeServer('ping')
local ping = tick()-Start
return math.floor(ping*1000+.5)
end
RunService.Stepped:connect(function()
FPS = math.floor(1/(tick()-Last))
Last = tick()
if FPS < 20 and GetPing() > 200 then
low:FireServer(player)
elseif FPS <= 35 and GetPing() <= 100 then
med:FireServer(player)
elseif FPS <= 60 and GetPing() <= 50 then
high:FireServer(player)
elseif FPS > 80 and GetPing() < 25 then
extreme:FireServer(player)
end
end)
there are four stages to performance low, medium, high, extreme, these would fire the server and update the player’s name tag respectively
server script (this script is “supposed” to update it to the whole server, I am not 100% sure if I needed a client script for the server to fire all the clients and update the change on the client, but I am sure that the client cannot change a nametag for another player.
anyway here is the script for the server to show and update the nametag for all clients to see:
local RS = game:GetService("ReplicatedStorage")
local low = RS:WaitForChild("PreformanceEvents"):WaitForChild("Low")
local med = RS:WaitForChild("PreformanceEvents"):WaitForChild("Med")
local high = RS:WaitForChild("PreformanceEvents"):WaitForChild("High")
local extreme = RS:WaitForChild("PreformanceEvents"):WaitForChild("Extreme")
low.OnServerEvent:Connect(function(player)
local character = player:WaitForChild("Character")
local head = character.Head
local textlabel = head:WaitForChild("NameTagGui").Frame2.Lag
textlabel.Text = "Player Lagging" -- thus is the text label above the players head in the billboard gui
textlabel.TextColor3 = Color3.fromRGB(215,0,0)
end)
med.OnServerEvent:Connect(function(player)
local character = player:WaitForChild("Character")
local head = character.Head
local textlabel = head:WaitForChild("NameTagGui").Frame2.Lag
textlabel.Text = "Ok preformance"
textlabel.TextColor3 = Color3.fromRGB(215,255,0)
end)
high.OnServerEvent:Connect(function(player)
local character = player:WaitForChild("Character")
local head = character.Head
local textlabel = head:WaitForChild("NameTagGui").Frame2.Lag
textlabel.Text = "Good Preformance"
textlabel.TextColor3 = Color3.fromRGB(0,255,0)
end)
extreme.OnServerEvent:Connect(function(player)
local character = player:WaitForChild("Character")
local head = character.Head
local textlabel = head:WaitForChild("NameTagGui").Frame2.Lag
textlabel.Text = "Extreme Preformance"
textlabel.TextColor3 = Color3.fromRGB(0,0,255)
end)
but when I try it is not passing into the server and then the client does not receive the update from the server on a different players preformance, what I am trying to achieve is a billboard GUI (name tag GUI) that shows the preformance of a player in-game to other players and updates it when the players preformance changes.
in the end, I want to achieve something like this
the image was taken from the place, New User Machine by Dummiez
you can see the preformance of the other players in-game.
here is the game where the screenshot was taken from:
New User Machine
anyone that can help me out here would be greatly appreciated.