if plr.Name==script.Parent.Parent.Parent.OwnerName.Value and plr.leaderstats.Money.Value>=price then plr.leaderstats.Money.Value=plr.leaderstats.Money.Value-price
this returns the error that I'm comparing a Value to a String, which you can't do apparently. So what should I do to fix this?
Make sure that plr.leaderstats.Money
is an IntValue and OwnerName
is a StringValue
Another problem could be, if the Value object
is named "Value", you need to make sure to use
Money.Value.Value
or OwnerName.Value.Value