1 CheckSale = game.ReplicatedStorage.CheckSale
2 Sword = game.ServerStorage.ShopItems.Sword
3 CheckSale.OnServerInvoke = function(player, Sword)
4 local Points = player:WaitForChild("leaderstats"):WaitForChild("Points")
5 if player.leaderstats.Points < game.ServerStorage.ShopItems.Sword.Price then
return false
else
return true
end
end
I'm trying to make a shop GUI and I'm having trouble on the purchase process of an item. I've used a remote function to send the information over to the server.
The error comes on line 5, I'm not sure what the error means or how to fix it. I'm very new to scripting so if you could explain to me as simple as possible that would be great.

2 comments
Points and Price are both Value instances. Use Points.Value and Price.Value.
Thanks man!