- What do you want to achieve? Keep it simple and clear!
I want a text label to display the amount of cash a player has. It should be visible at all times and also change its value if it detects a change.
- What is the issue? Include screenshots / videos if possible!
The issue is that nothing shows up and the GUI is blank.
Code
local cash = game.Players.LocalPlayer.leaderstats.Cash
local value = script.Parent
game.Players.PlayerAdded:Connect(function()
game.Players.LocalPlayer.CharacterAdded:Connect(function()
value.Text = "Cash: "..cash.Value
while wait(1) do
cash:GetPropertyChangedSignal('Value'):Connect(function()
value.Text = "Cash: "..cash.Value
wait(0.1)
end)
end
end)
end)
The script is a local script inside the text label.