Hey im wanting to know what is the best and stable way to make a Money GUI label
for your games.
i have tried and it doesn’t show when i join and when i use a while wait or while true it sometimes glitches
Hey im wanting to know what is the best and stable way to make a Money GUI label
for your games.
i have tried and it doesn’t show when i join and when i use a while wait or while true it sometimes glitches
You mean $? What is a currency label?
yes sorry ill change it to that
Do you mean a Gui that Shows how much money you have?
i should of mentioned i mean gui yes
what style are you going for? FPS, Simulator…
while wait(0.1) do
local currency = player.leaderstats.Money.Value
script.Parent.Text = currency
end
Something like this would work. Add it as a local script inside a textlabel.
Simulator yes something to go with that
the loop is useless in here you can just put an event to check whenever the Value
is Changed
here’s how to do it
local player = game.Players.LocalPlayer
local YourCurrency = player.leaderstats.Coins
local YourTextLabel = script.Parent
YourCurrency.Changed:Connect(function(val)
YourTextLabel.Text = val
end)
The suggestions above are basic and okay, however if you want / need abbreviations, you should make a function which abbreivates the number accordingly.
how do you do the abbrevs in them like?
I assume you mean add a money sign.
“$”…val
i think he means like “k” or “M”
ok, I would suggest going with a Gui simular to this
heres what my script would look like
while wait(1) do
script.Parent.Text = '$ '..game.Players.LocalPlayer.leaderstats.Cash.Value -- Don't worry about what the text says just change 'Cash - ' to the name of your stat
end
as i mentioned above, using a while loop in this is useless .Changed
Event will do the job.
i think this will work for now until ive found something that will cover
some short abbrevs Thank you
i cant use this! it doesn’t show my stat when i load
you must change YourCurrency to your own currency.