Why doesn't this work?
Error: Workspace.SellPlace.SellPart.Script:10: attempt to compare number with string
local Part = script.Parent
Part.Touched:Connect(function(HIT)
local H = HIT.Parent:FindFirstChild("Humanoid")
if H then
local player = game.Players:GetPlayerFromCharacter(HIT.Parent)
if player then
local leaderstats = player:WaitForChild("leaderstats")
local Currency = leaderstats.Money
local Selling = leaderstats.Strength
if Selling.Value > 0 then
Currency.Value = Currency.Value + Selling.Value *1
Selling.Value = 0
end
end
end
end)

4 comments
Tell me, are those values held by a number value or a string value?
String value
Hello, there's no way to compare that "ABC" is greater than 0, unless you turn each letters to a specific numbers
Dont mind the "unless" part :>