line 19 attempt to perform arithmetic (add) on string and number, why is this happenening??? it should work right
local CD = script.Parent.ClickDetector
local MS = game:GetService("MarketplaceService")
local players = game:GetService("Players")
local assetid = script.Parent.Parent.Parent.ClotheInfo.ShirtBuyID.Value
CD.MouseClick:Connect(function(plr)
MS:PromptPurchase(plr, assetid)
end)
MS.PromptPurchaseFinished:Connect(function(player, assetId, isPurchased)
if assetId == assetid then
if isPurchased then
local owner = game.Players:FindFirstChild(script.Parent.Parent.Parent.Parent.Parent.Owner.Value.Name)
print("giving")
local money = owner.leaderstats.Cash
money.Value = money.Value + 100
end
end
end)

1 comment
What kind of value is Owner? (ie. bool, int, string)