My script won't work

my script doesn’t seem to work it is suppose to my the currencys of my leaderstats show on a gui, but for some reason it isn’t
code: local replicatedStorage = game:GetService(“ReplicatedStorage”)

local players = game:GetService(“Players”)

local formatNumber = require(replicatedStorage:WaitForChild(“FormatNumberAlt”))

local player = players.LocalPlayer

local gems = player:WaitForChild(“leaderstats”):WaitForChild(“Gems”)

local gemsLabel = script.Parent:WaitForChild(“Gems”):WaitForChild(“Label”)

local textGems = formatNumber.FormatCompact(tonumber(gems.Value))

gemsLabel.Text = textGems

gems.Changed:Connect(function()

local text = formatNumber.FormatCompact(tonumber(gems.Value))

gemsLabel.Text = textGems

end)

first did u create an leader stats and where your script parented

from the looks of it, it is a local script. The local script cannot access ReplicatedStorage and also ReplicatedFirst.

The local script can access it (ReplicatedStorage and ReplicatedFirst)

What specifically does not work and are there any errors?

In fact LocalScripts can access ReplicatedStorage and ReplicatedFirst, they cannot access ServerStorage and ServerScriptStorage.

Also @RJGamer6096_4 next time elaborate better in which regard the script is not working, so that we can actually help.

yes i did create a leaderstats already

All i need it to do is change the text on the label when my currency goes up say my currency is 1m i want the label to say 1m