I need to know how to properly update everyone's BillboardGui's

You can write your topic however you want, but you need to answer these questions:

  1. **What do you want to achieve?
    I need to make the player can see all the other players BillboardGui’s getting updated, like for example cash

  2. **What is the issue?
    I’m not sure how to do it in the right way, should I do a remote and update from the server to everyone? or I can do it all from the local player I’m not sure that’s why im looking for help =)

  3. **What solutions have you tried so far?
    I got it working but I do not know if that is the right way (using a remote to update everyone’s billboard)

I just need a way to do it, I’m not sure if I’m doing it right or if I can do it efficiently to not cause problems or lag on the server.

I guess you can use a for loop to update each of the UIs on the server? But your remote event solution isn’t bad either.

3 Likes

yea but i was thinking if remote events are easily exploitable, or i should not care about that?, maybe idk and i forgot to mention they have to update every 1 second, so idk if that is going to affect the server lag too much

Remotes are always going to be exploitable, that’s why you have to implement checking into your code so that doesn’t happen. But firing a remote each second is kind of unreliable imo. I guess just go for the for loop.

both methods should work but the remote method is better because it allows you to add optimizations

like only updating the billboardgui if it’s in the player fov or not updating the billboard gui if the player is very far, etc…

if an exploiter changed the value for the billboard gui then he is breaking the game for himself, and no other player should get harmed by that because changea on client are local

1 Like

It’s as simple as this, let me know if you need anything else!

local players = game.Players

for _,v in pairs(players:GetPlayers()) do
   v.PlayerGui.BillboardGui.TextLabel.Text = "hello, this is a text label"
end

For leaderstats, try something like this…

local players = game.Players

for _,v in pairs(players:GetPlayers()) do
   local coins = v.leaderstats.Coins
   
   coins.Updated:Connect(function(value)
      v.PlayerGui.BillboardGui.TextLabel.Text = `Coins: {coins>Value}`
   end)
end

But OP also wants all the players to see each others billboards, im just not sure if a remote will work since its local.

1 Like

it will still work

if an exploiter changed a value of a Gui then he is breaking the game for himself and not for others and that shouldn’t be a problem for us since everyone one else will still see the billboards correctly

nvm i am wrong i didn’t realize that the remote is sent from the client to server but that still can be avoided if the cash value is on the server, then we can send the cash value from the server to clients directly

Edit: if the properties are Instance Values, then you can update the billboardGui locally without the need of remote events using Instance.Changed

1 Like

I put it inside a loop thanks for helping =) you all guys i fixed it and now i feel so dumb lol

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.