This script only doesn't work on the first time I change the coin amount in my script, which sets the coin amount to 5 for all players. It only updates once you get coins organically during gameplay. It's placed after the event call so there's no way it would've not caught it. Any idea why this is?
I previously tried using .Changed, but it didn't work either.
#GUI not updating on value set
1 messages · Page 1 of 1 (latest)
I would say something but as a russian person i can say i will get cooked if i get it wrong
Why are you doing n.player.PlayerGui if you’re passing a player list?
** You are now Level 9! **
Assuming you’re passing a list of player objects then n.PlayerGui should work?
@hexed night
Yeah bro ur singlehandedly the reason russia is invading ukraine and everyone hates russia
/j
I’m acc learning russian so
its a table
for i, player in game.Players:GetPlayers() do
i could probably do that?
you could definitely do that
no need to pass playerlist unless you’re doing some unnecessary black magic shit
where playerlist does not contain actual players
What is your playerList?
Also why are you using .OnClientEvent and trying to modify other clients guis?
You can only do that on the server
Fixing one issue may fix another, give it a try
i did and it didnt fix it
You completely refactored your code to be on the server side instead of the client side in like two minutes? Can you send your updated scripts?
Also any errors?
i didnt do that though
i just changed statFrame to refer to the local player's gui instead of the selected player
since its displaying all the players' stats on the screen
thats why im running through all of them
Right I am pretty sure I found the issue
So you’re firing the StatUpdateEvent, the client picks up the event, and then it connects a PropertyChangedSignal meaning the updated value is missed
Also you shouldn’t really connect events like that inside other events generally since you can cause memory leaks and shit iirc
You can skip the GetPropertyChanged signals entirely and just set the values outright from their current leaderstats values
👍