I'm trying to make a shop script where when you touch an object a gui pops up, And then you can select what you wish to purchase. I've managed to make it so that when you touch an object the gui pops up but i can't seem to make you able to purchase anything.
Script:
Money = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Value
function Purchase()
if Money == Money >100 then
Money = Money - 100
game.ReplicatedStorage.NyanCandy.Parent = script.Parent.Parent.Parent.Parent.Parent.Backpack
else
print("Error")
end
end
script.Parent.MouseButton1Click:connect(Purchase)
Error: "Players.bestrindberg.PlayerGui.Shop.ScrollingFrame.1.Script:3: attempt to compare number with boolean"
help me please.....

1 comment
You cannot compare number with boolean values.