New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
0

TextLabel Leaderstats connection not working, why? HELP!

Edited 3 months ago

Hello all!

I've been working on a new Club Game for ROBLOX, and I have been running into some trouble in regards to having the in-game currency, (VCash), show up inside of a text label! I will be providing gyazo images below to better understand my problems with the error code given by ROBLOX Studio!

Essentially, what I want to do is create a GUI that will tell the player their VCash amount inside the GUI where you purchase VCash. I have created the GUI, done the other coding for the GUI(The DeveloperProduct purchase calls, and handler), but I can't seem to figure out this simple trick in ROBLOX.

This has worked for me in previous games, but doesn't seem to now. I realize it may be out dated, but I'd like to know how to fix this problem asap!

Any and all help would be appreciated! Here are my images:

The Error Code(And Int Value in the player) -- https://gyazo.com/66f776536882d57c79691def71a50819

The Shop/Where the Label is -- https://gyazo.com/b06753a8fd43b51d596a971e3a5124d0

The Code itself that's failing:

wait();
while wait(0.1) do
end;


1
Thetacah 636
3 months ago

Hi!

VCash may not have loaded into leaderstats yet, so that may be why you're encountering this error.

wait();
while wait(0.1) do
end
end;


Cheers.

game.PlayerGui.TextLabel.Text = ""V-Cash: "..game.Players.LocalPlayer.leaderstats.VCash.Value;"