LocalScript can't fetch leaderstats value while other localscripts can?

  1. What do you want to achieve? Just fetch the player leaderstats value.

  2. What is the issue? LocalScript can’t seem to fetch it while other localscripts can?

  3. What solutions have you tried so far? Tried debugging and it only prints “Clicked” so the issue here is from leaderstats.

local Leaderstats = game.Players.LocalPlayer.leaderstats.TIX.Value
local buy = script.Parent.Parent.Purchase
local item = script.Parent.Parent.Purchase.ItemValue
local player = game.Players.LocalPlayer
buy.MouseButton1Down:Connect(function()
	warn("Clicked")
	if Leaderstats >= 1200 then
		warn("Meets amount required to buy.")
		if item.Value == "G18" then
			warn("Correct Value")
			if player == game.Players.LocalPlayer then
				warn("Must Fire")
				G18:FireServer()
			end
		end
	end
end)

The variable only updates on the first line only the first time the script runs.

Move it down inside the connection to have it update and access the .Value on mouse button click.