Iâm confuzzled by these lines here, youâre checking if both playerPushs & item are equal to nil which would result in that errorâŚ? nil is basically equaling to nothing or not valid
I know. But your cause is here if Iâm not mistaken. if playerPushs == nil and item == nil and itemCosts[item] == nil and playerPushs.Value == nil and playerPushs.Value < itemCosts[item] then return end
Because if itemCosts[item] is nil, it will go through, causing an error. For this conditional of yours to work, item needs to be nil, playerPushs needs to be nil, playerPushs.Value needs to be nil, itemCosts[item] needs to be nil, and playerPushs(nil).Value(nil) needs to be less than itemCosts(nil)[item(nil)] which isnât possible. This if statement does nothing as it currently is.
Change the ands to ors and it should work.
14:26:48.148 Pushs - Server - Shop:17
14:26:48.148 Normal Push - Server - Shop:18
14:26:48.148 nil - Server - Shop:19
14:26:48.149 0 - Server - Shop:20
14:26:48.149 ServerScriptService.Shop:21: attempt to compare number < nil - Server - Shop:21
So when the function is called, it uses the argument âNormal Pushâ, but in the table it is read as NormalPush with no space in it. Either get rid of the space on the LocalScript where you call the function, or add a space to the itemCosts table.