-
What do you want to achieve? Just fetch the player leaderstats value.
-
What is the issue? LocalScript can’t seem to fetch it while other localscripts can?
-
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)