I have a leaderboard script that inserts a folder called leaderstats. It also inserts a value called Money. I already have a "fake" money value in ServerStorage. That fake money value is actually real. So, back to the main thing here. I have a part in the script that says
local money = game.ServerStorage.PlayerStats:FindFirstChild(player.Name)
money:GetPropertyChangedSignal("Value"):Connect(function()
cash.Value = money.Value
end)
And yes, the leaderstats cash has a variable called Cash, if you were wondering. For some reason, when the money's value changes, the leaderstats cash doesn't change. Any help is appreciated. Here's the rest of the script:
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder",player)
leaderstats.Name = "leaderstats"
local cash = Instance.new("NumberValue",leaderstats)
cash.Name = "Money"
local money = game.ServerStorage.PlayerStats:FindFirstChild(player.Name)
money:GetPropertyChangedSignal("Value"):Connect(function()
cash.Value = money.Value
end)
end)
Any help is good

2 comments
It works for me. Are there any errors? Is this a local script or a server (normal) script?
Server script