Ive looked thru the code myself and everything looked fine but the script isnt working
local CashValue = script.Parent.Parent.Parent.Parent.Values.CashValue script.Parent.Touched:Connect(function(hit) if hit.Name == "Part" and hit:FindFirstChild("CashValue") then CashValue.Value += hit:FindFirstChild("CashValue").Value hit:Destroy() end end)
In the part where the parts goes in, this script should work
local CashValue = workspace.Tycoon.CashValue script.Parent.Touched:Connect(function(hit) if hit:FindFirstChild("CashValue") then --make sure its a part to sell idk how to say it lol local Value = hit:FindFirstChild("CashValue").Value CashValue.Value += Value --assuming CashValue is in workspace hit:Destroy() end end)