The Error says "attempt to index nil with 'leaderstats'" in the output. Anyone help me because i used both localscript and serverscript.
` local values = {
100,
200,
300,
400,
500,
600,
700,
800,
900,
1000
}
script.Parent.MouseButton1Click:Connect(function(player)
local hum = player.leaderstats
local val = hum.Points
if val.Value ~= values then
else
val.Value = val.Value - 100
local newcoil = game.ReplicatedFirst.GravityCoil:Clone()
newcoil.Parent = player.Backpack
end
end)`

2 comments
Is this a local script or a server script
local script