#String

7 messages · Page 1 of 1 (latest)

sturdy edge
#
local s = script.Parent
local f = game:GetService("Players").LocalPlayer:WaitForChild("leaderstats"):WaitForChild("Money")
s.Text = " 0 $"
f:GetPropertyChangedSignal("Value"):Connect(function()
s.Text = "<text here>" .. tostring(f.Value) .. "$"
end)
mossy trellis
#

this requires something called concatnation, and while gigtih made a working code above, i’ll explain how this works

#

concatnation allows you to display 2 values together

#

in order to do it, you have to follow the following format

local a = “money: ”
local b = 20

print(a .. b)

#

this will print:

“money: 20
#

just adding 2 periods between the values allows for concatenation

#

in your case, this line should work:

s.Text = f.Value .. “$”