What's wrong with my leaderboard

What’s wrong with my gui. The text label won’t change the value.

Output:
Infinite yield possible on ‘Players.SilentSuprion:WaitForChild(“LeaderStatsScript”)’

Script:
local Player = game.Players.LocalPlayer

local Leaderstats = Player:WaitForChild(“LeaderStatsScript”)

local Cash = Leaderstats:WaitForChild(“Cash”)

while wait() do

script.Parent.Text = “Cash”…Cash.Value

end

It looks like LeaderStatsScript doesn’t exist. I’m on a phone right now, so I’m going to let another programmer finish answering your question.

The warning is pretty straightforward, the script cannot find a script named “LeaderStatsScripts” parented inside the Player Object

Can you send a picture of your Player hierarchy when you start the game?

1 Like

It does exist. But, is it a problem that it’s in workspace?

Ok but why is it in the workspace

This line

Needs to be parented to the Player object, otherwise it’ll return back as an infinite yield warning cause it can’t find it

If it’s parented to the workspace, that’s more than likely your reason why

1 Like

Thanks for your help, you are very active and is always able to answer my questions.

2 Likes