Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why doesnt it tell me how much i have?

So I'm trying to make it so it tells me how much i have,But i doesnt work.

local TextLabel = script.Parent.TextLabel
local Plr = game.Players.LocalPlayer
TextLabel.Text = "You have" ..Plr.leaderstats.Coins.. "Coins!"



1 answer

✓ Accepted answer

From now on please provide an output if one is given.

The answer to your question is quite simple. You need to put .Value on the end of a value object's path in order to get the value of it, otherwise you are only getting the object and not the value of it. This script should work but you may have to check the output to see what else might be causing it to not work.

local TextLabel = script.Parent.TextLabel
local Plr = game.Players.LocalPlayer
TextLabel.Text = "You have"..Plr.leaderstats.Coins.Value.."Coins!"

This discussion is preserved as it was. New answers, comments, and votes are closed.