Hi! So I am having trouble with something. I want to make it to where once someone joins the game, or the value of cash changes, the label on the top right changes to that amount, which is the money label to let you know how much you have. What is wrong with my script? This is based on the leaderstats usage of Cash values
local Players = game:GetService("Players")
local leaderstats = Players.LocalPlayer:WaitForChild("leaderstats")
local MoneyText = script.Parent.TextLabel
local MoneyInt = leaderstats:WaitForChild("Cash")
Players.PlayerAdded:Connect(function(player)
MoneyText.Text = MoneyInt.Value
end)
MoneyInt.Changed:Connect(function()
MoneyText.Text = MoneyInt.Value
end)