Hello, I made a surfacegui shop and when you buy something, it connects to a remoteEvent that gives you the tool and takes away some points, but when I buy an item, my points count doesn't lower, and I get this in my output: ServerScriptService.Shop:14: attempt to perform arithmetic on field 'Points' (a userdata value). Does anybody know what this means and how to fix this?
--- this is a script in ServerScriptService game.Players.PlayerAdded:Connect(function(p) game.ReplicatedStorage.remoteEvent1.OnServerEvent:Connect(function() game.ReplicatedStorage["Item1"]:Clone().Parent = p.Backpack p.leaderstats.Points = p.leaderstats.Points - 25
Turns out I just made a dumb mistake and I forgot to put ".Value" in after "Points"