I have not yet tested the GUI to my testers but I believe that this GUI will only show the cash value of the local player in game and not the Currentplayer name the text is displaying. The Gui displays the players name fine, just that the cash is displaying only the local player cash.
Cash code—
local player = game.Players.LocalPlayer
local Cash = player:WaitForChild(“leaderstat”):WaitForChild(“Cash”) "
The Text Code—
“PlayerName.Text = CurrentPlayer.Name … " $” … tostring(Cash.Value)"
The reason why my gut is saying this is because of this "
Update cash Code—
Cash.Changed:Connect(function()
My scripting team is just me and chat gdt. I do not consider myself to be a scripter because of my lack of knowledge. This should be a easy fix for experience scripters.
Alright, This code “PlayerName.Text = CurrentPlayer.Name … " $” … tostring(Cash.Value)” displays the current player name, then right beside it, the player cash value. The problem is that the cash value isnt displaying the current player cash value, instead it is displaying the local player cash value.
And Just to inform you guys, This script was not created by ChatGPT, it was from the toolbox. I Just use ChatGPT to solve script errors for me.
OK, sorry for me not explaining well, I’m just a novice.
This Leaderboard GUI displays all the players names in the server. It also displays all the players cash aswell making it visible for everyone to see. Each player has their own cash. BUT, The problem is the cash is only showing the Local player cash. Meaning that this leaderboard GUI shows my cash value in next to my friends name.
For those who are still confuse, this is basically in a illustration, You, Bobby, and Tim join the game. A GUI appears in the game, This GUI shows all the players in the server, and all the players cash. But, Tim, Bob have the exact same amount of cash you have? Why? Because the Cash is displaying the not Bob or Tim’s Cash, But yours.
I want the GUI to display not the local player (You) cash, but the other players cash.
Okay I see now (fr this time). You’re defining the variable “Cash”’s path like this:
local Cash = player:WaitForChild(“leaderstat”).Cash
It should be this instead, under “CurrentPlayer”:
local Cash = game.Players[CurrentPlayer.Name].leaderstat.Cash
If you want a detailed explanation, ChatGPT defined “player” as game.Players.LocalPlayer (YOUR PLAYER). So for example, on Player1’s screen both names on the leaderboard would be “Player1”. So that’s why I changed it to a square brace reference (forgot what it was called lol).
Check if the gui exists in first place, Play the game then open explore then top on players select yourself and open PlayerGui and show us if it’s there.