Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why doesnt it tell me how much i have?

Asked by 8 years ago

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

Log in to vote
1
Answered by 8 years ago

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!"
Ad

Answer this question