I never know how to make the points that show up there for example like bloxburg and work at a pizza place I want to know how to make the point lable?
Right, I am going to assume that you have a TextLabel
in a ScreenGui
, and that you have leaderstats set up.
I have two variables
defining the location of both the TextLabel and the Points.
local label = game.Players.LocalPlayer.PlayerGui.ScreenGui.TextLabel local points = game.Players.LocalPlayer.leaderstats.POINTS_NAME
I am connecting to the event, .Changed
, this means the function
will run once theIntValue
has changed.
points.Changed:Connect(function()
Once the IntValue
is .Changed
, the Label will update itself to whatever the points.Value is equal to.
label.Text = '$'..tostring(points.Value) end)
Full Code:
local label = game.Players.LocalPlayer.PlayerGui.ScreenGui.TextLabel local points = game.Players.LocalPlayer.leaderstats.POINTS_NAME points.Changed:Connect(function() label.Text = '$'..tostring(points.Value) end)
This code should be in a localscript.
Don't forget to rename POINTS_NAME
to whatever the IntValue
inside your leaderstats is named as.
Also, if you don't want '$' in front of the total points, remove '$'..
from the script, too.
Here is how to set up leaderstats: Link
Hope this helps! Don't forget to accept my answer if this works for you, or leave a comment if you need further assistance!
Closed as Not Constructive by hiimgoodpack, lukeb50, and abnotaddable
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?