I’m getting this weird error
Line 39 - 45:
local leaderstats = Instance.new("Folder")
leaderstats.Parent = Player
leaderstats.Name = "leaderstats"
local Candy = Instance.new("NumberValue")
Candy.Parent = leaderstats
Candy.Name = "Candy"
Line 115 - 121:
--GetPropertyChangedSignal
Candy:GetPropertyChangedSignal("Value"):Connect(function()
if Candy.Value >= maximumBackpackCapacity then --Error line
Candy.Value = maximumBackpackCapacity
Argument:FireClient(Player, "ChangeDataValues", maximumBackpackCapacity)
end
end)
For information, “maximumBackpackCapacity” is a number variable which changes if you own a certain BoolValue. (Check under for more information)
if Backpack1.Value == true then
maximumBackpackCapacity = 10
if Backpack2.Value == true then
maximumBackpackCapacity = 100
if Backpack3.Value == true then
maximumBackpackCapacity = 1000
if Backpack4.Value == true then
maximumBackpackCapacity = 10000
end
end
end
end
There is already a datastore implemented which uses Tables
Any help is appreciated, thanks