when i run the game the error in the title appear
local player = game.Players.GetPlayerFromCharacter
local leaderstats = player:WaitForChild("leaderstats")
local config = script.Parent.Parent.Parent.Frame.ScrollingFrame.Frame.ImageButton.Config
script.Parent.MouseButton1Click:Connect(function()
if leaderstats.Diamonds.Value >= config.Cost.Value then
leaderstats.Diamonds.Value = leaderstats.Diamonds.Value - config.Cost.Value
end
end)

2 comments
What line does the error occur on?
What line does the error occur on?