You can write your topic however you want, but you need to answer these questions:
**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
**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 =)
**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.
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
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
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