local HitBox = script.Parent
local rs = game:GetService("ReplicatedStorage")
local MoneyBag = rs:WaitForChild("MoneyBag")
HitBox.Touched:Connect(function(hit)
if not hit:IsA("BasePart") then return end
local touchedModel = hit:FindFirstAncestorOfClass("Model")
if not touchedModel then return end
local valueObj = touchedModel:FindFirstChild("Value")
local canSale = touchedModel:FindFirstChild("CanSale")
if valueObj and canSale and canSale.Value == true then
if touchedModel:FindFirstChild("AlreadySold") then return end
local alreadySoldFlag = Instance.new("BoolValue")
alreadySoldFlag.Name = "AlreadySold"
alreadySoldFlag.Parent = touchedModel
print("sale")
local newBag = MoneyBag:Clone()
local bagValue = newBag:FindFirstChild("Value")
if bagValue then
bagValue.Value = valueObj.Value
newBag.CFrame = HitBox.CFrame
newBag.Parent = workspace
else
warn("MoneyBag missing Value object!")
end
touchedModel:Destroy()
end
end)
its just dont work, what is problem

